aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/lists.texi9
-rw-r--r--doc/lispref/minibuf.texi1
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index 5ef21d06710..27fa5385e35 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -777,6 +777,9 @@ non-@code{nil}, it is added at the end.
777The argument @var{symbol} is not implicitly quoted; @code{add-to-list} 777The argument @var{symbol} is not implicitly quoted; @code{add-to-list}
778is an ordinary function, like @code{set} and unlike @code{setq}. Quote 778is an ordinary function, like @code{set} and unlike @code{setq}. Quote
779the argument yourself if that is what you want. 779the argument yourself if that is what you want.
780
781Do not use this function when @var{symbol} refers to a lexical
782variable.
780@end defun 783@end defun
781 784
782Here's a scenario showing how to use @code{add-to-list}: 785Here's a scenario showing how to use @code{add-to-list}:
@@ -799,8 +802,9 @@ foo ;; @r{@code{foo} was changed.}
799@var{value})} is this: 802@var{value})} is this:
800 803
801@example 804@example
802(or (member @var{value} @var{var}) 805(if (member @var{value} @var{var})
803 (setq @var{var} (cons @var{value} @var{var}))) 806 @var{var}
807 (setq @var{var} (cons @var{value} @var{var})))
804@end example 808@end example
805 809
806@defun add-to-ordered-list symbol element &optional order 810@defun add-to-ordered-list symbol element &optional order
@@ -828,6 +832,7 @@ and unlike @code{setq}. Quote the argument yourself if necessary.
828 832
829The ordering information is stored in a hash table on @var{symbol}'s 833The ordering information is stored in a hash table on @var{symbol}'s
830@code{list-order} property. 834@code{list-order} property.
835@var{symbol} cannot refer to a lexical variable.
831@end defun 836@end defun
832 837
833Here's a scenario showing how to use @code{add-to-ordered-list}: 838Here's a scenario showing how to use @code{add-to-ordered-list}:
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 0f60b3fd00d..ac38b9d390d 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -572,6 +572,7 @@ and returns the updated history list. It limits the list length to
572the value of @var{maxelt} (if non-@code{nil}) or @code{history-length} 572the value of @var{maxelt} (if non-@code{nil}) or @code{history-length}
573(described below). The possible values of @var{maxelt} have the same 573(described below). The possible values of @var{maxelt} have the same
574meaning as the values of @code{history-length}. 574meaning as the values of @code{history-length}.
575@var{history-var} cannot refer to a lexical variable.
575 576
576Normally, @code{add-to-history} removes duplicate members from the 577Normally, @code{add-to-history} removes duplicate members from the
577history list if @code{history-delete-duplicates} is non-@code{nil}. 578history list if @code{history-delete-duplicates} is non-@code{nil}.