emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 2e66013: Ensure minibuffer input is added to history in read_mi


From: Eli Zaretskii
Subject: emacs-27 2e66013: Ensure minibuffer input is added to history in read_minibuf
Date: Fri, 31 Jan 2020 04:19:15 -0500 (EST)

branch: emacs-27
commit 2e66013dcf1e139436cc806725e0b04945be55a9
Author: Federico Tedin <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Ensure minibuffer input is added to history in read_minibuf
    
    * src/minibuf.c (read_minibuf): Parse input string after saving
    the string to the history list instead of before, in case parsing
    signals an error or is interrupted by C-g.  (Bug#39291)
---
 src/minibuf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/minibuf.c b/src/minibuf.c
index c5f6145..b837cc5 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -696,10 +696,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, 
Lisp_Object prompt,
   else
     histstring = Qnil;
 
-  /* If Lisp form desired instead of string, parse it.  */
-  if (expflag)
-    val = string_to_object (val, defalt);
-
   /* The appropriate frame will get selected
      in set-window-configuration.  */
   unbind_to (count, Qnil);
@@ -710,6 +706,10 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, 
Lisp_Object prompt,
   if (! (NILP (Vhistory_add_new_input) || NILP (histstring)))
     call2 (intern ("add-to-history"), histvar, histstring);
 
+  /* If Lisp form desired instead of string, parse it.  */
+  if (expflag)
+    val = string_to_object (val, defalt);
+
   return val;
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]