diff options
author | Jarek Czekalski <jarekczek@poczta.onet.pl> | 2014-05-07 17:03:47 +0200 |
---|---|---|
committer | Jarek Czekalski <jarekczek@poczta.onet.pl> | 2014-05-07 17:03:47 +0200 |
commit | 73b60c4af9c5dea00158d22f91f05984202b6e64 (patch) | |
tree | cd78bfa76c4d382d60c47299ec4df2a165b22fa9 /src/minibuf.c | |
parent | 1ddb2150e64c2d07bd91a3883a0028a0b8599d76 (diff) | |
download | emacs-73b60c4af9c5dea00158d22f91f05984202b6e64.tar.gz |
Fix initialization of minibuffer history variable, bug #17430.
* minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
Move the initialization up to prevent any "value void" message.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r-- | src/minibuf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index f325381d1ca..03d6104f226 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -535,6 +535,13 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, if (!NILP (Vminibuffer_completing_file_name)) Vminibuffer_completing_file_name = Qlambda; + /* If variable is unbound, make it nil. */ + Lisp_Object histval = find_symbol_value (Vminibuffer_history_variable); + if (EQ (histval, Qunbound)) { + Fset (Vminibuffer_history_variable, Qnil); + histval = Qnil; + } + if (inherit_input_method) { /* `current-input-method' is buffer local. So, remember it in @@ -703,13 +710,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, { /* 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. */ - - histval = find_symbol_value (Vminibuffer_history_variable); - if (EQ (histval, Qunbound)) - Fset (Vminibuffer_history_variable, Qnil); /* The value of the history variable must be a cons or nil. Other values are unacceptable. We silently ignore these values. */ |