[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ce54573: Respect s-s-b-default-predicate when killi
From: |
João Távora |
Subject: |
[Emacs-diffs] master ce54573: Respect s-s-b-default-predicate when killing terminal |
Date: |
Wed, 27 Jun 2018 09:20:00 -0400 (EDT) |
branch: master
commit ce54573dacaeb234ac006b71cbaafe1c543515f1
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Respect s-s-b-default-predicate when killing terminal
Fixes: Bug#31951
* lisp/server.el (server-save-buffers-kill-terminal): Only pass
PRED=t to save-some-bufers if ARG in non-nil.
---
lisp/server.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lisp/server.el b/lisp/server.el
index 9eedc29..87942e8 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1673,13 +1673,15 @@ only these files will be asked to be saved."
(save-buffers-kill-emacs arg)))
((processp proc)
(let ((buffers (process-get proc 'buffers)))
- ;; If client is bufferless, emulate a normal Emacs exit
- ;; and offer to save all buffers. Otherwise, offer to
- ;; save only the buffers belonging to the client.
(save-some-buffers
arg (if buffers
+ ;; Only files from emacsclient file list.
(lambda () (memq (current-buffer) buffers))
- t))
+ ;; No emacsclient file list: don't override
+ ;; `save-some-buffers-default-predicate' (unless
+ ;; ARG is non-nil), since we're not killing
+ ;; Emacs (unlike `save-buffers-kill-emacs').
+ (and arg t)))
(server-delete-client proc)))
(t (error "Invalid client frame")))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master ce54573: Respect s-s-b-default-predicate when killing terminal,
João Távora <=