aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMattias EngdegÄrd2020-02-02 12:48:51 +0100
committerMattias EngdegÄrd2020-02-02 12:52:44 +0100
commitf27187f963e9e36435b508e29256e048799e0ff2 (patch)
tree373e6bd927a4219da74f18c5dda3254f85823b92 /lisp
parent32763dac46e61cc34e8fe4d19df4905d09c1a27f (diff)
downloademacs-f27187f963e9e36435b508e29256e048799e0ff2.tar.gz
emacs-f27187f963e9e36435b508e29256e048799e0ff2.zip
Clarify lexvar restrictions for add-to-ordered-list, add-to-history
* lisp/subr.el (add-to-ordered-list, add-to-history): * doc/lispref/lists.texi (List Variables): * doc/lispref/minibuf.texi (Minibuffer History): Note in the doc string and manual that the variable arguments to add-to-ordered-list and add-to-history cannot refer to a lexical variable (bug#39373).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/subr.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 05fb82321e5..c1c4cad18d1 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1935,6 +1935,7 @@ of ELEMENT if it has one.
1935 1935
1936The list order for each element is stored in LIST-VAR's 1936The list order for each element is stored in LIST-VAR's
1937`list-order' property. 1937`list-order' property.
1938LIST-VAR cannot refer to a lexical variable.
1938 1939
1939The return value is the new value of LIST-VAR." 1940The return value is the new value of LIST-VAR."
1940 (let ((ordering (get list-var 'list-order))) 1941 (let ((ordering (get list-var 'list-order)))
@@ -1963,7 +1964,8 @@ variable. The possible values of maximum length have the same meaning as
1963the values of `history-length'. 1964the values of `history-length'.
1964Remove duplicates of NEWELT if `history-delete-duplicates' is non-nil. 1965Remove duplicates of NEWELT if `history-delete-duplicates' is non-nil.
1965If optional fourth arg KEEP-ALL is non-nil, add NEWELT to history even 1966If optional fourth arg KEEP-ALL is non-nil, add NEWELT to history even
1966if it is empty or duplicates the most recent entry in the history." 1967if it is empty or duplicates the most recent entry in the history.
1968HISTORY-VAR cannot refer to a lexical variable."
1967 (unless maxelt 1969 (unless maxelt
1968 (setq maxelt (or (get history-var 'history-length) 1970 (setq maxelt (or (get history-var 'history-length)
1969 history-length))) 1971 history-length)))