aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
authorAlan Mackenzie2020-11-05 19:27:43 +0000
committerAlan Mackenzie2020-11-05 19:27:43 +0000
commit2ecbf4cfae7bd504fbdca28e1e51ee2574fe5d12 (patch)
treedb4eee9a921e881edad01513dd57701633479d93 /src/frame.c
parentbfd31242025cde90c8252db92dc54d0be4115c91 (diff)
downloademacs-2ecbf4cfae7bd504fbdca28e1e51ee2574fe5d12.tar.gz
emacs-2ecbf4cfae7bd504fbdca28e1e51ee2574fe5d12.zip
Allow minibuffer to stay in its original frame. Tidy up this area.
* doc/emacs/mini.texi (Basic Minibuffer): Add an entry for minibuffer-follows-selected-frame. * doc/lispref/minibuf.texi (Minibuffer Misc): Describe the new parameter to minibufferp, LIVE. * etc/NEWS: Add an entry describing the new minibuffer strategy. * lisp/cus-start.el (minibuffer-prompt-properties--setter): Add an entry for minibuffer-follows-selected-frame. * lisp/minibuffer.el (minibuffer-message): Check for the current buffer being an _active_ minibuffer rather than merely a minibuffer. * src/frame.c (do_switch_frame): Call move_minibuffer_onto_frame. * src/lisp.h (Top level): Add prototypes for move_minibuffer_onto_frame and is_minibuffer. * src/minibuf.c (minibuf_follows_frame): New function which ignores local and let-bound values of minibuffer-follows-selected-frame. (choose_minibuf_frame): Reformulate this function to reuse a minibuffer window where possible, and to ensure no other frame has its minibuffer current, but only when `minibuffer-follows-selected-frame'. (move_minibuffer_onto_frame): New function. (live_minibuffer_p): New function. (Fminibufferp): Add a new &optional parameter LIVE. Reformulate, possibly calling live_minibuffer_p. (read_minibuf): move the incrementation of minibuf_level to before the call of choose_minibuf_frame. Empty the miniwindows of frames without an active minibuffer, rather than of all but the current frame. (is_minibuffer): New function. (read_minibuf_unwind): Note the miniwindow being restored and resize all other miniwindows to zero size. (minibuffer-follows-selected-frame): New configuration variable. * src/window.c (candidate_window_p): In some scenarios, check the miniwindow holds an active minibuffer. * src/xdisp.c (get_window_cursor_type): Suppress the cursor for non-active miniwindows, regardless of minibuf_level.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index 7c377da4456..512aaf5f45c 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1482,6 +1482,7 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
1482#endif 1482#endif
1483 internal_last_event_frame = Qnil; 1483 internal_last_event_frame = Qnil;
1484 1484
1485 move_minibuffer_onto_frame ();
1485 return frame; 1486 return frame;
1486} 1487}
1487 1488