bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21723: 24.5; Bug in `server-kill-emacs-query-function'


From: Eli Barzilay
Subject: bug#21723: 24.5; Bug in `server-kill-emacs-query-function'
Date: Wed, 21 Oct 2015 04:52:01 -0400

The code in `server-kill-emacs-query-function' (in server.el) has this
in an `or':

    (let (live-client)
      (dolist (proc server-clients)
        (when (memq t (mapcar 'buffer-live-p (process-get
                                              proc 'buffers)))
          (setq live-client t)))
      live-client)

IIUC, this looks for a live client, and if there is one, the t result
means that the yes-or-no-p question in the end will *not* get asked.
I verified this by:

  * Starting emacs -Q and in it start the server

  * Run emacsclient on a random file

  * Now, C-x C-c exits without asking any questions.

It seems to me like that condition is reversed, an the last line
should instead be: (not live-client)

This will also make the first condition in the function unnecessary,
since if there are no clients, then the loop will not find a live one
and the question will be skipped.

-- 
                    ((x=>x(x))(x=>x(x)))                   Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]