diff options
| author | Richard M. Stallman | 1998-05-19 03:41:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-19 03:41:25 +0000 |
| commit | c6d6572475603083762cb0155ae966de7710bb9c (patch) | |
| tree | 0dd191fb1f6b4a57a8a57e893664047e4cea741a /src | |
| parent | fb639443f9479881966b56d75a3d20a1b8465b6c (diff) | |
| download | emacs-c6d6572475603083762cb0155ae966de7710bb9c.tar.gz emacs-c6d6572475603083762cb0155ae966de7710bb9c.zip | |
(read_minibuf): If history list var is void, make it nil.
Diffstat (limited to 'src')
| -rw-r--r-- | src/minibuf.c | 8 |
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, | |||
| 425 | 425 | ||
| 426 | /* Add the value to the appropriate history list unless it is empty. */ | 426 | /* Add the value to the appropriate history list unless it is empty. */ |
| 427 | if (XSTRING (val)->size != 0 | 427 | if (XSTRING (val)->size != 0 |
| 428 | && SYMBOLP (Vminibuffer_history_variable) | 428 | && SYMBOLP (Vminibuffer_history_variable)) |
| 429 | && ! EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound)) | ||
| 430 | { | 429 | { |
| 431 | /* If the caller wanted to save the value read on a history list, | 430 | /* If the caller wanted to save the value read on a history list, |
| 432 | then do so if the value is not already the front of the list. */ | 431 | then do so if the value is not already the front of the list. */ |
| 433 | Lisp_Object histval; | 432 | Lisp_Object histval; |
| 433 | |||
| 434 | /* If variable is unbound, make it nil. */ | ||
| 435 | if (EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound)) | ||
| 436 | Fset (Vminibuffer_history_variable, Qnil); | ||
| 437 | |||
| 434 | histval = Fsymbol_value (Vminibuffer_history_variable); | 438 | histval = Fsymbol_value (Vminibuffer_history_variable); |
| 435 | 439 | ||
| 436 | /* The value of the history variable must be a cons or nil. Other | 440 | /* The value of the history variable must be a cons or nil. Other |