]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix logic in 'server-kill-emacs-query-function'
authorEli Zaretskii <eliz@gnu.org>
Wed, 21 Oct 2015 16:50:10 +0000 (19:50 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 21 Oct 2015 16:50:10 +0000 (19:50 +0300)
* lisp/server.el (server-kill-emacs-query-function): Correct the
logic that controls whether the user is asked for confirmation.
(Bug#21723)

lisp/server.el

index 5a67f12072b16c0cc1494e4091dc2c9668a5ba14..59fd973115b5830b7f9e0e7e0e6a6d7bba623087 100644 (file)
@@ -1491,13 +1491,12 @@ specifically for the clients and did not exist before their request for it."
 
 (defun server-kill-emacs-query-function ()
   "Ask before exiting Emacs if it has live clients."
-  (or (not server-clients)
-      (let (live-client)
-       (dolist (proc server-clients)
-         (when (memq t (mapcar 'buffer-live-p (process-get
-                                               proc 'buffers)))
-           (setq live-client t)))
-        live-client)
+  (or (not (let (live-client)
+             (dolist (proc server-clients)
+               (when (memq t (mapcar 'buffer-live-p (process-get
+                                                     proc 'buffers)))
+                 (setq live-client t)))
+             live-client))
       (yes-or-no-p "This Emacs session has clients; exit anyway? ")))
 
 (defun server-kill-buffer ()