diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/minibuf.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index e951f0bf66b..dc13d641a57 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -259,25 +259,28 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos) | |||
| 259 | /* VAL is the string of minibuffer text. */ | 259 | /* VAL is the string of minibuffer text. */ |
| 260 | last_minibuf_string = val; | 260 | last_minibuf_string = val; |
| 261 | 261 | ||
| 262 | /* If Lisp form desired instead of string, parse it. */ | ||
| 263 | if (expflag) | ||
| 264 | val = Fread (val); | ||
| 265 | |||
| 266 | /* Add the value to the appropriate history list. */ | 262 | /* Add the value to the appropriate history list. */ |
| 267 | if (XTYPE (Vminibuffer_history_variable) == Lisp_Symbol | 263 | if (XTYPE (Vminibuffer_history_variable) == Lisp_Symbol |
| 268 | && ! EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound)) | 264 | && ! EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound)) |
| 269 | { | 265 | { |
| 270 | /* If the caller wanted to save the value read on a history list, | 266 | /* If the caller wanted to save the value read on a history list, |
| 271 | then do so if the value is not already the front of the list. */ | 267 | then do so if the value is not already the front of the list. */ |
| 272 | Lisp_Object histval = Fsymbol_value (Vminibuffer_history_variable); | 268 | Lisp_Object histval; |
| 269 | histval = Fsymbol_value (Vminibuffer_history_variable); | ||
| 273 | 270 | ||
| 274 | /* The value of the history variable must be a cons or nil. Other | 271 | /* The value of the history variable must be a cons or nil. Other |
| 275 | values are unacceptable. We silenty ignore these values. */ | 272 | values are unacceptable. We silently ignore these values. */ |
| 276 | if (NILP (histval) | 273 | if (NILP (histval) |
| 277 | || (CONSP (histval) && NILP (Fequal (val, Fcar (histval))))) | 274 | || (CONSP (histval) |
| 278 | Fset (Vminibuffer_history_variable, Fcons (val, histval)); | 275 | && NILP (Fequal (last_minibuf_string, Fcar (histval))))) |
| 276 | Fset (Vminibuffer_history_variable, | ||
| 277 | Fcons (last_minibuf_string, histval)); | ||
| 279 | } | 278 | } |
| 280 | 279 | ||
| 280 | /* If Lisp form desired instead of string, parse it. */ | ||
| 281 | if (expflag) | ||
| 282 | val = Fread (val); | ||
| 283 | |||
| 281 | unbind_to (count, Qnil); /* The appropriate frame will get selected | 284 | unbind_to (count, Qnil); /* The appropriate frame will get selected |
| 282 | in set-window-configuration. */ | 285 | in set-window-configuration. */ |
| 283 | 286 | ||