diff options
| author | Richard M. Stallman | 1997-04-11 06:04:27 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-04-11 06:04:27 +0000 |
| commit | 4f69d8f6d856181a68cbcfabe405a2eca9dbf6e1 (patch) | |
| tree | 19355ad68efc14bfa122c8cc2b919928323dac51 | |
| parent | 17b3a11bfc66faa92ba2a8c4bfc46177a9b3b3c4 (diff) | |
| download | emacs-4f69d8f6d856181a68cbcfabe405a2eca9dbf6e1.tar.gz emacs-4f69d8f6d856181a68cbcfabe405a2eca9dbf6e1.zip | |
(read_minibuf): Get the string from the minibuffer
even if the user has selected a different buffer.
| -rw-r--r-- | src/minibuf.c | 6 |
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) | |||
| 189 | { | 189 | { |
| 190 | Lisp_Object val; | 190 | Lisp_Object val; |
| 191 | int count = specpdl_ptr - specpdl; | 191 | int count = specpdl_ptr - specpdl; |
| 192 | Lisp_Object mini_frame, ambient_dir; | 192 | Lisp_Object mini_frame, ambient_dir, minibuffer; |
| 193 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 193 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 194 | 194 | ||
| 195 | single_kboard_state (); | 195 | single_kboard_state (); |
| @@ -268,7 +268,8 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histvar, histpos) | |||
| 268 | 268 | ||
| 269 | /* Switch to the minibuffer. */ | 269 | /* Switch to the minibuffer. */ |
| 270 | 270 | ||
| 271 | Fset_buffer (get_minibuffer (minibuf_level)); | 271 | minibuffer = get_minibuffer (minibuf_level); |
| 272 | Fset_buffer (minibuffer); | ||
| 272 | 273 | ||
| 273 | /* The current buffer's default directory is usually the right thing | 274 | /* The current buffer's default directory is usually the right thing |
| 274 | for our minibuffer here. However, if you're typing a command at | 275 | 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) | |||
| 354 | } | 355 | } |
| 355 | 356 | ||
| 356 | /* Make minibuffer contents into a string */ | 357 | /* Make minibuffer contents into a string */ |
| 358 | Fset_buffer (minibuffer); | ||
| 357 | val = make_buffer_string (1, Z, 1); | 359 | val = make_buffer_string (1, Z, 1); |
| 358 | #if 0 /* make_buffer_string should handle the gap. */ | 360 | #if 0 /* make_buffer_string should handle the gap. */ |
| 359 | bcopy (GAP_END_ADDR, XSTRING (val)->data + GPT - BEG, Z - GPT); | 361 | bcopy (GAP_END_ADDR, XSTRING (val)->data + GPT - BEG, Z - GPT); |