changeset 70675:fd67818fc8dc

(Minibuffer History): Update add-to-history.
author Kim F. Storm <storm@cua.dk>
date Tue, 16 May 2006 10:52:14 +0000
parents 13c49a63f416
children 94777c0d5d77
files lispref/minibuf.texi
diffstat 1 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/minibuf.texi	Tue May 16 10:05:09 2006 +0000
+++ b/lispref/minibuf.texi	Tue May 16 10:52:14 2006 +0000
@@ -449,17 +449,20 @@
 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
-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
+@defun add-to-history history-var newelt &optional maxelt keep-all
+This function adds a new element @var{newelt}, if non-empty, 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}.
+Duplicate members are removed from the history list, if
+@code{history-delete-duplicates} is non-@code{nil}.
+
+If @var{keep-all} is non-@code{nil}, even an empty or duplicate
+@var{newelt} element is added to the history list.
 @end defun
 
 @defvar history-length