all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#31951: 27.0.50; [PATCH] server-save-buffers-kill-terminal should respect save-some-buffers-default-predicate
@ 2018-06-23 16:22 João Távora
  2018-06-24 13:37 ` Noam Postavsky
  0 siblings, 1 reply; 8+ messages in thread
From: João Távora @ 2018-06-23 16:22 UTC (permalink / raw)
  To: 31951

Hi,

If the Emacs client was started without an explicit list of buffers to
edit, save-some-buffers is called with t for PRED (save all buffers),
but that was before save-some-buffers-default-predicate existed.

I don't see any reason why save-some-buffers-default-predicate shouldn't
be respected in server-save-buffers-kill-terminal (of course if ARG is
non-nil, we do pass t so that the previous behaviour remains).

Trivial patch attached,
João

diff --git a/lisp/server.el b/lisp/server.el
index ff03cbe622..ac14ef314e 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1670,9 +1670,9 @@ server-save-buffers-kill-terminal
 	     ;; and offer to save all buffers.  Otherwise, offer to
 	     ;; save only the buffers belonging to the client.
 	     (save-some-buffers
-	      arg (if buffers
-		      (lambda () (memq (current-buffer) buffers))
-		    t))
+	      arg (and buffers
+		       (lambda () (memq (current-buffer) buffers))
+                       (and arg t)))
 	     (server-delete-client proc)))
 	  (t (error "Invalid client frame")))))





^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-06-27 13:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-23 16:22 bug#31951: 27.0.50; [PATCH] server-save-buffers-kill-terminal should respect save-some-buffers-default-predicate João Távora
2018-06-24 13:37 ` Noam Postavsky
2018-06-24 20:22   ` João Távora
2018-06-24 20:46     ` Noam Postavsky
2018-06-25 11:07       ` João Távora
2018-06-26  1:53         ` Noam Postavsky
2018-06-26 19:27           ` João Távora
2018-06-27 13:20           ` João Távora

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.