[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#31951: 27.0.50; [PATCH] server-save-buffers-kill-terminal should res
bug#31951: 27.0.50; [PATCH] server-save-buffers-kill-terminal should respect save-some-buffers-default-predicate
Mon, 25 Jun 2018 21:53:45 -0400
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
João Távora <address@hidden> writes:
> I tried to make it terser, but couldn't.
Hmm, maybe just concentrate on the save-some-buffers-default-predicate
thing. I think the original comment pretty much redundantly repeats
what the doc string (and the code itself) say.
@@ -1639,13 +1639,15 @@ server-save-buffers-kill-terminal
(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.
arg (if buffers
- (lambda () (memq (current-buffer) buffers))
+ ;; Only files from emacsclient file list.
+ (lambda () (memq (current-buffer) buffers))
+ ;; No emacsclient file list: don't override
+ ;; `save-some-buffers-default-predicate' (unless
+ ;; ARGS is non-nil), since we're not killing
+ ;; Emacs (unlike `save-buffers-kill-emacs').
+ (and arg t)))
(t (error "Invalid client frame")))))