Mercurial > emacs
changeset 98329:221d7f943454
(server-buffer-done): Avoid changing the buffer when deleting the
client's frame (bug#640).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Wed, 24 Sep 2008 20:12:02 +0000 |
parents | 7a4e70e656a1 |
children | 71824a19fc92 |
files | lisp/server.el |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/server.el Wed Sep 24 20:11:47 2008 +0000 +++ b/lisp/server.el Wed Sep 24 20:12:02 2008 +0000 @@ -1084,7 +1084,13 @@ ;; tell it that it is done, and forget it entirely. (unless buffers (server-log "Close" proc) - (server-delete-client proc))))) + (if for-killing + ;; `server-delete-client' might delete the client's + ;; frames, which might change the current buffer. We + ;; don't want that (bug#640). + (save-current-buffer + (server-delete-client proc)) + (server-delete-client proc)))))) (when (and (bufferp buffer) (buffer-name buffer)) ;; We may or may not kill this buffer; ;; if we do, do not call server-buffer-done recursively