aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-20 04:37:03 +0000
committerRichard M. Stallman1994-10-20 04:37:03 +0000
commit9f6131cfa00eb9046a77a74d5fc3e2d8b24c2b9e (patch)
tree0063c34d329079450900d274ed3774b667eb123a /src
parent1942f68fa421e1e41b56558e9254d493f8afb6ef (diff)
downloademacs-9f6131cfa00eb9046a77a74d5fc3e2d8b24c2b9e.tar.gz
emacs-9f6131cfa00eb9046a77a74d5fc3e2d8b24c2b9e.zip
(read_minibuf): Undo previous change.
Diffstat (limited to 'src')
-rw-r--r--src/minibuf.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index d63ed473161..f83e9ac8499 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -269,22 +269,8 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos)
269 /* VAL is the string of minibuffer text. */ 269 /* VAL is the string of minibuffer text. */
270 last_minibuf_string = val; 270 last_minibuf_string = val;
271 271
272 /* If Lisp form desired instead of string, parse it. */
273 if (expflag)
274 {
275 Lisp_Object expr_and_pos;
276 unsigned char *p;
277
278 expr_and_pos = Fread_from_string (val, Qnil, Qnil);
279 /* Ignore trailing whitespace; any other trailing junk is an error. */
280 for (p = XSTRING (val)->data + XINT (Fcdr (expr_and_pos)); *p; p++)
281 if (*p != ' ' && *p != '\t' && *p != '\n')
282 error ("Trailing garbage following expression");
283 val = Fcar (expr_and_pos);
284 }
285
286 /* Add the value to the appropriate history list unless it is empty. */ 272 /* Add the value to the appropriate history list unless it is empty. */
287 if (XSTRING (last_minibuf_string)->size != 0 273 if (XSTRING (val)->size != 0
288 && SYMBOLP (Vminibuffer_history_variable) 274 && SYMBOLP (Vminibuffer_history_variable)
289 && ! EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound)) 275 && ! EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound))
290 { 276 {
@@ -296,8 +282,24 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos)
296 /* The value of the history variable must be a cons or nil. Other 282 /* The value of the history variable must be a cons or nil. Other
297 values are unacceptable. We silently ignore these values. */ 283 values are unacceptable. We silently ignore these values. */
298 if (NILP (histval) 284 if (NILP (histval)
299 || (CONSP (histval) && NILP (Fequal (val, XCONS (histval)->car)))) 285 || (CONSP (histval)
300 Fset (Vminibuffer_history_variable, Fcons (val, histval)); 286 && NILP (Fequal (last_minibuf_string, Fcar (histval)))))
287 Fset (Vminibuffer_history_variable,
288 Fcons (last_minibuf_string, histval));
289 }
290
291 /* If Lisp form desired instead of string, parse it. */
292 if (expflag)
293 {
294 Lisp_Object expr_and_pos;
295 unsigned char *p;
296
297 expr_and_pos = Fread_from_string (val, Qnil, Qnil);
298 /* Ignore trailing whitespace; any other trailing junk is an error. */
299 for (p = XSTRING (val)->data + XINT (Fcdr (expr_and_pos)); *p; p++)
300 if (*p != ' ' && *p != '\t' && *p != '\n')
301 error ("Trailing garbage following expression");
302 val = Fcar (expr_and_pos);
301 } 303 }
302 304
303 return unbind_to (count, val); /* The appropriate frame will get selected 305 return unbind_to (count, val); /* The appropriate frame will get selected