summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2006-05-06 07:53:25 +0000
committerEli Zaretskii <eliz@gnu.org>2006-05-06 07:53:25 +0000
commit321eb4b29a0cd5899f0ff7633f86935e9167175f (patch)
tree18bedfbae6ba92e0a0f2b0fed8a47bab9610d450
parent41f7a85e0d33a63df8c1a4cac61fc3ee8b123d7c (diff)
downloademacs-321eb4b29a0cd5899f0ff7633f86935e9167175f.tar.gz
(Minibuffer History): Document add-to-history.
-rw-r--r--lispref/minibuf.texi18
1 files changed, 17 insertions, 1 deletions
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi
index 4faf8fd374c..dd96a020057 100644
--- a/lispref/minibuf.texi
+++ b/lispref/minibuf.texi
@@ -449,11 +449,27 @@ list, put the length in the @code{history-length} property of the
history list symbol. The variable @code{history-delete-duplicates}
specifies whether to delete duplicates in history.
+@defun add-to-history history-var newelt &optional maxelt keep-dups
+This function adds a new element @var{newelt} to the history list
+stored in the variable @var{history-var}, and returns the updated
+history list. By default, the list length is limited by the value
+specified by @code{history-length} (described below), but the optional
+argument @var{maxelt} overrides that. The possible values of
+@var{maxelt} have the same meaning as the values of
+@code{history-length}.
+
+Duplicate members are removed from the history list, unless
+@code{history-delete-duplicates} is @code{nil} or the second optional
+argument of this function @var{keep-dups} is non-@code{nil}.
+@end defun
+
@defvar history-length
The value of this variable specifies the maximum length for all
history lists that don't specify their own maximum lengths. If the
value is @code{t}, that means there no maximum (don't delete old
-elements).
+elements). The value of @code{history-length} property of the history
+list variable's symbol, if set, overrides this variable for that
+particular history list.
@end defvar
@defvar history-delete-duplicates