diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2020-02-01 20:11:11 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2020-02-01 22:26:57 +0100 |
commit | d07f177382b24945e1f579744702908b33605c3e (patch) | |
tree | 3f4b24a1365b2fafd2a3b6b458662408f8418287 /lisp | |
parent | d3d2ea927c19aed1eb74d60066627f13a4bc27d5 (diff) | |
download | emacs-d07f177382b24945e1f579744702908b33605c3e.tar.gz emacs-d07f177382b24945e1f579744702908b33605c3e.tar.bz2 emacs-d07f177382b24945e1f579744702908b33605c3e.zip |
Clarify add-to-list documentation (bug#39373)
While add-to-list often works with lexical variables, this is a hack
that isn't always effective; better tell the user not to try.
* doc/lispref/lists.texi (List Variables): Add a note about lexical
variables to the add-to-list description. Fix the equivalent code.
* lisp/subr.el (add-to-list): Amend doc string.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/subr.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index a4fdc6bdfef..05fb82321e5 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1845,6 +1845,7 @@ COMPARE-FN if that's non-nil. If ELEMENT is added, it is added at the beginning of the list, unless the optional argument APPEND is non-nil, in which case ELEMENT is added at the end. +LIST-VAR should not refer to a lexical variable. The return value is the new value of LIST-VAR. |