=== modified file 'src/ChangeLog' --- src/ChangeLog 2014-05-06 21:13:37 +0000 +++ src/ChangeLog 2014-05-07 10:11:31 +0000 @@ -1,3 +1,9 @@ +2014-05-07 Jarek Czekalski + + Fix initialization of minibuffer history variable (Bug#xxxxx). + * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound. + Move the initialization up to prevent any "value void" message. + 2014-05-06 Paul Eggert * image.c: Do not use libpng if HAVE_NS, as NS does its own thing. === modified file 'src/minibuf.c' --- src/minibuf.c 2014-03-21 17:04:50 +0000 +++ src/minibuf.c 2014-05-07 10:09:50 +0000 @@ -384,6 +384,7 @@ EMACS_INT pos = 0; /* String to add to the history. */ Lisp_Object histstring; + Lisp_Object histval; Lisp_Object empty_minibuf; Lisp_Object dummy, frame; @@ -535,6 +536,13 @@ if (!NILP (Vminibuffer_completing_file_name)) Vminibuffer_completing_file_name = Qlambda; + /* If variable is unbound, make it nil. */ + 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 +711,6 @@ { /* 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. */