diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2020-02-02 12:48:51 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2020-02-02 12:52:44 +0100 |
commit | f27187f963e9e36435b508e29256e048799e0ff2 (patch) | |
tree | 373e6bd927a4219da74f18c5dda3254f85823b92 /lisp/subr.el | |
parent | 32763dac46e61cc34e8fe4d19df4905d09c1a27f (diff) | |
download | emacs-f27187f963e9e36435b508e29256e048799e0ff2.tar.gz emacs-f27187f963e9e36435b508e29256e048799e0ff2.tar.bz2 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/subr.el')
-rw-r--r-- | lisp/subr.el | 4 |
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. The list order for each element is stored in LIST-VAR's `list-order' property. +LIST-VAR cannot refer to a lexical variable. The return value is the new value of LIST-VAR." (let ((ordering (get list-var 'list-order))) @@ -1963,7 +1964,8 @@ variable. The possible values of maximum length have the same meaning as the values of `history-length'. Remove duplicates of NEWELT if `history-delete-duplicates' is non-nil. If optional fourth arg KEEP-ALL is non-nil, add NEWELT to history even -if it is empty or duplicates the most recent entry in the history." +if it is empty or duplicates the most recent entry in the history. +HISTORY-VAR cannot refer to a lexical variable." (unless maxelt (setq maxelt (or (get history-var 'history-length) history-length))) |