summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-03-18 08:48:53 -0600
committerTom Tromey <tromey@redhat.com>2013-03-18 08:48:53 -0600
commitcbcba8ce7f980b01c18c0fd561ef6687b1361507 (patch)
tree140c65bdc6c44e7539d853cb9f66bc5a7e500351 /src/buffer.c
parentdad8121b0e4438e68b23d388585f703e75951337 (diff)
downloademacs-cbcba8ce7f980b01c18c0fd561ef6687b1361507.tar.gz
don't let kill-buffer kill a buffer if it is current in any thread
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 4d24f970792..b7b471d6d46 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1726,6 +1726,9 @@ cleaning up all windows currently displaying the buffer to be killed. */)
if (!BUFFER_LIVE_P (b))
return Qnil;
+ if (thread_check_current_buffer (b))
+ return Qnil;
+
/* Query if the buffer is still modified. */
if (INTERACTIVE && !NILP (BVAR (b, filename))
&& BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))