diff options
| author | Mattias EngdegÄrd | 2020-02-02 12:48:51 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2020-02-02 12:52:44 +0100 |
| commit | f27187f963e9e36435b508e29256e048799e0ff2 (patch) | |
| tree | 373e6bd927a4219da74f18c5dda3254f85823b92 /lisp | |
| parent | 32763dac46e61cc34e8fe4d19df4905d09c1a27f (diff) | |
| download | emacs-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.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. | |||
| 1935 | 1935 | ||
| 1936 | The list order for each element is stored in LIST-VAR's | 1936 | The list order for each element is stored in LIST-VAR's |
| 1937 | `list-order' property. | 1937 | `list-order' property. |
| 1938 | LIST-VAR cannot refer to a lexical variable. | ||
| 1938 | 1939 | ||
| 1939 | The return value is the new value of LIST-VAR." | 1940 | The 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 | |||
| 1963 | the values of `history-length'. | 1964 | the values of `history-length'. |
| 1964 | Remove duplicates of NEWELT if `history-delete-duplicates' is non-nil. | 1965 | Remove duplicates of NEWELT if `history-delete-duplicates' is non-nil. |
| 1965 | If optional fourth arg KEEP-ALL is non-nil, add NEWELT to history even | 1966 | If optional fourth arg KEEP-ALL is non-nil, add NEWELT to history even |
| 1966 | if it is empty or duplicates the most recent entry in the history." | 1967 | if it is empty or duplicates the most recent entry in the history. |
| 1968 | HISTORY-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))) |