diff options
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/lists.texi | 9 | ||||
| -rw-r--r-- | doc/lispref/minibuf.texi | 1 |
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. | |||
| 777 | The argument @var{symbol} is not implicitly quoted; @code{add-to-list} | 777 | The argument @var{symbol} is not implicitly quoted; @code{add-to-list} |
| 778 | is an ordinary function, like @code{set} and unlike @code{setq}. Quote | 778 | is an ordinary function, like @code{set} and unlike @code{setq}. Quote |
| 779 | the argument yourself if that is what you want. | 779 | the argument yourself if that is what you want. |
| 780 | |||
| 781 | Do not use this function when @var{symbol} refers to a lexical | ||
| 782 | variable. | ||
| 780 | @end defun | 783 | @end defun |
| 781 | 784 | ||
| 782 | Here's a scenario showing how to use @code{add-to-list}: | 785 | Here'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 | ||
| 829 | The ordering information is stored in a hash table on @var{symbol}'s | 833 | The 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 | ||
| 833 | Here's a scenario showing how to use @code{add-to-ordered-list}: | 838 | Here'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 | |||
| 572 | the value of @var{maxelt} (if non-@code{nil}) or @code{history-length} | 572 | the 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 |
| 574 | meaning as the values of @code{history-length}. | 574 | meaning as the values of @code{history-length}. |
| 575 | @var{history-var} cannot refer to a lexical variable. | ||
| 575 | 576 | ||
| 576 | Normally, @code{add-to-history} removes duplicate members from the | 577 | Normally, @code{add-to-history} removes duplicate members from the |
| 577 | history list if @code{history-delete-duplicates} is non-@code{nil}. | 578 | history list if @code{history-delete-duplicates} is non-@code{nil}. |