aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-06-26 03:49:20 +0000
committerRichard M. Stallman1995-06-26 03:49:20 +0000
commit32fda9ba24e6e1fab2d09c321448115cf0afcd6a (patch)
treebc5f8da38e5f0bd3bf85e6bd6b504168fd4b90e7 /src
parent06537cc8b58aada3c9a5ddb353f3f884f7498057 (diff)
downloademacs-32fda9ba24e6e1fab2d09c321448115cf0afcd6a.tar.gz
emacs-32fda9ba24e6e1fab2d09c321448115cf0afcd6a.zip
(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.c31
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.")
1069 1069
1070 /* The last frame we saw with a minibuffer, minibuffer-only or not. */ 1070 /* The last frame we saw with a minibuffer, minibuffer-only or not. */
1071 Lisp_Object frame_with_minibuf; 1071 Lisp_Object frame_with_minibuf;
1072 /* Some frame we found on the same kboard, or nil if there are none. */
1073 Lisp_Object frame_on_same_kboard;
1072 1074
1075 frame_on_same_kboard = Qnil;
1073 frame_with_minibuf = Qnil; 1076 frame_with_minibuf = Qnil;
1077
1074 for (frames = Vframe_list; 1078 for (frames = Vframe_list;
1075 CONSP (frames); 1079 CONSP (frames);
1076 frames = XCONS (frames)->cdr) 1080 frames = XCONS (frames)->cdr)
@@ -1092,18 +1096,27 @@ but if the second optional argument FORCE is non-nil, you may do so.")
1092 if (FRAME_MINIBUF_ONLY_P (f1)) 1096 if (FRAME_MINIBUF_ONLY_P (f1))
1093 break; 1097 break;
1094 } 1098 }
1099
1100 if (FRAME_KBOARD (f) == FRAME_KBOARD (f1))
1101 frame_on_same_kboard = this;
1095 } 1102 }
1096 1103
1097 /* We know that there must be some frame with a minibuffer out 1104 if (!NILP (frame_on_same_kboard))
1098 there. If this were not true, all of the frames present 1105 {
1099 would have to be minibufferless, which implies that at some 1106 /* We know that there must be some frame with a minibuffer out
1100 point their minibuffer frames must have been deleted, but 1107 there. If this were not true, all of the frames present
1101 that is prohibited at the top; you can't delete surrogate 1108 would have to be minibufferless, which implies that at some
1102 minibuffer frames. */ 1109 point their minibuffer frames must have been deleted, but
1103 if (NILP (frame_with_minibuf)) 1110 that is prohibited at the top; you can't delete surrogate
1104 abort (); 1111 minibuffer frames. */
1112 if (NILP (frame_with_minibuf))
1113 abort ();
1105 1114
1106 FRAME_KBOARD (f)->Vdefault_minibuffer_frame = frame_with_minibuf; 1115 FRAME_KBOARD (f)->Vdefault_minibuffer_frame = frame_with_minibuf;
1116 }
1117 else
1118 /* No frames left on this kboard--say no minibuffer either. */
1119 FRAME_KBOARD (f)->Vdefault_minibuffer_frame = Qnil;
1107 } 1120 }
1108 1121
1109 return Qnil; 1122 return Qnil;