# HG changeset patch # User Richard M. Stallman # Date 753731063 0 # Node ID 47cc31b4740293625f5e3e8a914d4e0114f6d149 # Parent 9a42f23df119bca9fb098f5431c561c267abcf3a (read_minibuf): History list always gets strings, not Lisp objects made by read. diff -r 9a42f23df119 -r 47cc31b47402 src/minibuf.c --- a/src/minibuf.c Fri Nov 19 17:43:24 1993 +0000 +++ b/src/minibuf.c Fri Nov 19 17:44:23 1993 +0000 @@ -259,25 +259,28 @@ /* VAL is the string of minibuffer text. */ last_minibuf_string = val; - /* If Lisp form desired instead of string, parse it. */ - if (expflag) - val = Fread (val); - /* Add the value to the appropriate history list. */ if (XTYPE (Vminibuffer_history_variable) == Lisp_Symbol && ! 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 = Fsymbol_value (Vminibuffer_history_variable); + 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 silenty ignore these values. */ + values are unacceptable. We silently ignore these values. */ if (NILP (histval) - || (CONSP (histval) && NILP (Fequal (val, Fcar (histval))))) - Fset (Vminibuffer_history_variable, Fcons (val, 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) + val = Fread (val); + unbind_to (count, Qnil); /* The appropriate frame will get selected in set-window-configuration. */