changeset 17387:b0d63d297969

(read_minibuf): Get the string from the minibuffer even if the user has selected a different buffer.
author Richard M. Stallman <rms@gnu.org>
date Fri, 11 Apr 1997 06:04:27 +0000
parents b251c8820860
children 5c4602f0c45d
files src/minibuf.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/minibuf.c	Fri Apr 11 05:59:37 1997 +0000
+++ b/src/minibuf.c	Fri Apr 11 06:04:27 1997 +0000
@@ -189,7 +189,7 @@
 {
   Lisp_Object val;
   int count = specpdl_ptr - specpdl;
-  Lisp_Object mini_frame, ambient_dir;
+  Lisp_Object mini_frame, ambient_dir, minibuffer;
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
 
   single_kboard_state ();
@@ -268,7 +268,8 @@
 
   /* Switch to the minibuffer.  */
 
-  Fset_buffer (get_minibuffer (minibuf_level));
+  minibuffer = get_minibuffer (minibuf_level);
+  Fset_buffer (minibuffer);
 
   /* The current buffer's default directory is usually the right thing
      for our minibuffer here.  However, if you're typing a command at
@@ -354,6 +355,7 @@
     }
 
   /* Make minibuffer contents into a string */
+  Fset_buffer (minibuffer);
   val = make_buffer_string (1, Z, 1);
 #if 0  /* make_buffer_string should handle the gap.  */
   bcopy (GAP_END_ADDR, XSTRING (val)->data + GPT - BEG, Z - GPT);