summaryrefslogtreecommitdiff
path: root/src/minibuf.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-04-11 06:04:27 +0000
committerRichard M. Stallman <rms@gnu.org>1997-04-11 06:04:27 +0000
commitd099fefc86dfdf3fcd5cf2d42bac5e2fef65d73e (patch)
tree201b931cde28ab189a318a6ab1f1a988968b6db6 /src/minibuf.c
parent74475f874f463125619495dd9e223d730d38ffac (diff)
downloademacs-d099fefc86dfdf3fcd5cf2d42bac5e2fef65d73e.tar.gz
(read_minibuf): Get the string from the minibuffer
even if the user has selected a different buffer.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r--src/minibuf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index daf533eda4f..249e96f485a 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -189,7 +189,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos)
{
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 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos)
/* 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 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos)
}
/* 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);