diff options
| author | Gerd Moellmann | 2000-11-21 20:41:11 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-11-21 20:41:11 +0000 |
| commit | 77270fac616dd9a25743c95c7082489e5a669f35 (patch) | |
| tree | 309dfbf28c02887e267fbfaaffcfbf090d22bb31 /src/buffer.c | |
| parent | 06466d9ad1c4e3771143b3e336051a040d6fdc98 (diff) | |
| download | emacs-77270fac616dd9a25743c95c7082489e5a669f35.tar.gz emacs-77270fac616dd9a25743c95c7082489e5a669f35.zip | |
(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.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c index 8c2deeb5bac..99815cb2d7d 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1236,6 +1236,17 @@ with SIGHUP.") | |||
| 1236 | return Qnil; | 1236 | return Qnil; |
| 1237 | } | 1237 | } |
| 1238 | 1238 | ||
| 1239 | /* Notice if the buffer to kill is the sole visible buffer | ||
| 1240 | when we're currently in the mini-buffer, and give up if so. */ | ||
| 1241 | XSETBUFFER (tem, current_buffer); | ||
| 1242 | if (EQ (tem, XWINDOW (minibuf_window)->buffer)) | ||
| 1243 | { | ||
| 1244 | tem = Fother_buffer (buf, Qnil, Qnil); | ||
| 1245 | Fset_buffer (tem); | ||
| 1246 | if (EQ (buf, tem)) | ||
| 1247 | return Qnil; | ||
| 1248 | } | ||
| 1249 | |||
| 1239 | /* Now there is no question: we can kill the buffer. */ | 1250 | /* Now there is no question: we can kill the buffer. */ |
| 1240 | 1251 | ||
| 1241 | #ifdef CLASH_DETECTION | 1252 | #ifdef CLASH_DETECTION |