diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-06-26 03:49:20 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-06-26 03:49:20 +0000 |
commit | 32fda9ba24e6e1fab2d09c321448115cf0afcd6a (patch) | |
tree | bc5f8da38e5f0bd3bf85e6bd6b504168fd4b90e7 /src | |
parent | 06537cc8b58aada3c9a5ddb353f3f884f7498057 (diff) | |
download | emacs-32fda9ba24e6e1fab2d09c321448115cf0afcd6a.tar.gz |
(Fdelete_frame): It's ok to have no minibuffer left on
a kboard if there are no frames on it either.
Diffstat (limited to 'src')
-rw-r--r-- | src/frame.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/src/frame.c b/src/frame.c index 7f523d073d5..382fa0b98a5 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1069,8 +1069,12 @@ but if the second optional argument FORCE is non-nil, you may do so.") /* The last frame we saw with a minibuffer, minibuffer-only or not. */ Lisp_Object frame_with_minibuf; + /* Some frame we found on the same kboard, or nil if there are none. */ + Lisp_Object frame_on_same_kboard; + frame_on_same_kboard = Qnil; frame_with_minibuf = Qnil; + for (frames = Vframe_list; CONSP (frames); frames = XCONS (frames)->cdr) @@ -1092,18 +1096,27 @@ but if the second optional argument FORCE is non-nil, you may do so.") if (FRAME_MINIBUF_ONLY_P (f1)) break; } + + if (FRAME_KBOARD (f) == FRAME_KBOARD (f1)) + frame_on_same_kboard = this; } - /* We know that there must be some frame with a minibuffer out - there. If this were not true, all of the frames present - would have to be minibufferless, which implies that at some - point their minibuffer frames must have been deleted, but - that is prohibited at the top; you can't delete surrogate - minibuffer frames. */ - if (NILP (frame_with_minibuf)) - abort (); + if (!NILP (frame_on_same_kboard)) + { + /* We know that there must be some frame with a minibuffer out + there. If this were not true, all of the frames present + would have to be minibufferless, which implies that at some + point their minibuffer frames must have been deleted, but + that is prohibited at the top; you can't delete surrogate + minibuffer frames. */ + if (NILP (frame_with_minibuf)) + abort (); - FRAME_KBOARD (f)->Vdefault_minibuffer_frame = frame_with_minibuf; + FRAME_KBOARD (f)->Vdefault_minibuffer_frame = frame_with_minibuf; + } + else + /* No frames left on this kboard--say no minibuffer either. */ + FRAME_KBOARD (f)->Vdefault_minibuffer_frame = Qnil; } return Qnil; |