# HG changeset patch # User Gerd Moellmann # Date 974839163 0 # Node ID 6864fead9622991d226c9b031f5ea463f9965e24 # Parent e7765cb122c3da8424235ab3678381322f0201af (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. diff -r e7765cb122c3 -r 6864fead9622 src/buffer.c --- 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