changeset 33698:6864fead9622

(Fkill_buffer): Notice if the buffer to kill is the sole visible buffer when we're currently in the mini-buffer, and give up if so.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 21 Nov 2000 20:39:23 +0000
parents e7765cb122c3
children 76d6d2515065
files src/buffer.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Tue Nov 21 19:18:13 2000 +0000
+++ b/src/buffer.c	Tue Nov 21 20:39:23 2000 +0000
@@ -1236,6 +1236,17 @@
 	return Qnil;
     }
 
+  /* Notice if the buffer to kill is the sole visible buffer
+     when we're currently in the mini-buffer, and give up if so.  */
+  XSETBUFFER (tem, current_buffer);
+  if (EQ (tem, XWINDOW (minibuf_window)->buffer))
+    {
+      tem = Fother_buffer (buf, Qnil, Qnil);
+      Fset_buffer (tem);
+      if (EQ (buf, tem))
+	return Qnil;
+    }
+
   /* Now there is no question: we can kill the buffer.  */
 
 #ifdef CLASH_DETECTION