Mercurial > emacs
changeset 22137:2b0e6a1e7fb9
(read_minibuf): If history list var is void, make it nil.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 19 May 1998 03:41:25 +0000 |
parents | bc8c7f59c064 |
children | d4ac295a98b3 |
files | src/minibuf.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/minibuf.c Tue May 19 02:59:42 1998 +0000 +++ b/src/minibuf.c Tue May 19 03:41:25 1998 +0000 @@ -425,12 +425,16 @@ /* Add the value to the appropriate history list unless it is empty. */ if (XSTRING (val)->size != 0 - && SYMBOLP (Vminibuffer_history_variable) - && ! EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound)) + && SYMBOLP (Vminibuffer_history_variable)) { /* If the caller wanted to save the value read on a history list, then do so if the value is not already the front of the list. */ Lisp_Object histval; + + /* If variable is unbound, make it nil. */ + if (EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound)) + Fset (Vminibuffer_history_variable, Qnil); + histval = Fsymbol_value (Vminibuffer_history_variable); /* The value of the history variable must be a cons or nil. Other