# HG changeset patch # User Richard M. Stallman # Date 782627823 0 # Node ID f696aae6c5e08beda7908fb84543c2f6af99c1fd # Parent e466cdfd962ef74ed95bd35ffc5fc3dbe56e5874 (read_minibuf): Undo previous change. diff -r e466cdfd962e -r f696aae6c5e0 src/minibuf.c --- a/src/minibuf.c Thu Oct 20 04:33:34 1994 +0000 +++ b/src/minibuf.c Thu Oct 20 04:37:03 1994 +0000 @@ -269,6 +269,25 @@ /* VAL is the string of minibuffer text. */ last_minibuf_string = val; + /* 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)) + { + /* 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; + histval = Fsymbol_value (Vminibuffer_history_variable); + + /* The value of the history variable must be a cons or nil. Other + values are unacceptable. We silently ignore these values. */ + if (NILP (histval) + || (CONSP (histval) + && NILP (Fequal (last_minibuf_string, Fcar (histval))))) + Fset (Vminibuffer_history_variable, + Fcons (last_minibuf_string, histval)); + } + /* If Lisp form desired instead of string, parse it. */ if (expflag) { @@ -283,23 +302,6 @@ val = Fcar (expr_and_pos); } - /* Add the value to the appropriate history list unless it is empty. */ - if (XSTRING (last_minibuf_string)->size != 0 - && SYMBOLP (Vminibuffer_history_variable) - && ! EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound)) - { - /* 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; - histval = Fsymbol_value (Vminibuffer_history_variable); - - /* The value of the history variable must be a cons or nil. Other - values are unacceptable. We silently ignore these values. */ - if (NILP (histval) - || (CONSP (histval) && NILP (Fequal (val, XCONS (histval)->car)))) - Fset (Vminibuffer_history_variable, Fcons (val, histval)); - } - return unbind_to (count, val); /* The appropriate frame will get selected in set-window-configuration. */ }