diff options
author | Richard M. Stallman <rms@gnu.org> | 2006-01-01 02:10:52 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2006-01-01 02:10:52 +0000 |
commit | b20de1cd1c3c50c3ba74cc35fd2feb03927c36ff (patch) | |
tree | 16e2b0d2ac0bbb63fba43e99b013d244a7514ab2 | |
parent | b2a41d1250133a8e8ae46d1cab26774dc5308139 (diff) | |
download | emacs-b20de1cd1c3c50c3ba74cc35fd2feb03927c36ff.tar.gz |
(read_minibuf): Clear out all other minibuffer windows.
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/minibuf.c | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 398fe286de9..e550604498d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-12-31 Richard M. Stallman <rms@gnu.org> + + * minibuf.c (read_minibuf): Clear out all other minibuffer windows. + 2005-12-31 Eli Zaretskii <eliz@gnu.org> * emacs.c (gdb_pvec_type): A dummy variable for GDB's sake. diff --git a/src/minibuf.c b/src/minibuf.c index df9f5dcc336..a0accf6ed50 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -463,6 +463,9 @@ read_minibuf (map, initial, prompt, backup_n, expflag, /* String to add to the history. */ Lisp_Object histstring; + Lisp_Object empty_minibuf; + Lisp_Object dummy, frame; + extern Lisp_Object Qfront_sticky; extern Lisp_Object Qrear_nonsticky; @@ -639,6 +642,22 @@ read_minibuf (map, initial, prompt, backup_n, expflag, Vminibuf_scroll_window = selected_window; if (minibuf_level == 1 || !EQ (minibuf_window, selected_window)) minibuf_selected_window = selected_window; + + /* Empty out the minibuffers of all frames other than the one + where we are going to display one now. + Set them to point to ` *Minibuf-0*', which is always empty. */ + empty_minibuf = Fget_buffer (build_string (" *Minibuf-0*")); + + FOR_EACH_FRAME (dummy, frame) + { + Lisp_Object root_window = Fframe_root_window (frame); + Lisp_Object mini_window = XWINDOW (root_window)->next; + + if (! NILP (mini_window) && !NILP (Fwindow_minibuffer_p (mini_window))) + Fset_window_buffer (mini_window, empty_minibuf, Qnil); + } + + /* Display this minibuffer in the proper window. */ Fset_window_buffer (minibuf_window, Fcurrent_buffer (), Qnil); Fselect_window (minibuf_window, Qnil); XSETFASTINT (XWINDOW (minibuf_window)->hscroll, 0); |