summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-05-19 03:41:25 +0000
committerRichard M. Stallman <rms@gnu.org>1998-05-19 03:41:25 +0000
commit7a1297f918acdca3438f6393fac1928af2357c58 (patch)
tree8c688dd1a6f13177ac97eaf6c48b39f967fc3d30
parent9c3fbdb0f07946bbf8c6ff67e4bf951f29ec1ffa (diff)
downloademacs-7a1297f918acdca3438f6393fac1928af2357c58.tar.gz
(read_minibuf): If history list var is void, make it nil.
-rw-r--r--src/minibuf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index bc86a912dd4..8006cc9354d 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -425,12 +425,16 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
/* 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