Remove unneeded prompt "Buffer ... still has clients"

* server.el (server-start): Remove the only call to:
(server-kill-buffer-query-function): Remove.

Fixes: debbugs:16548
This commit is contained in:
Jarek Czekalski 2014-05-05 09:35:50 +02:00
parent 3ea33e3215
commit 80e377c0d0
2 changed files with 7 additions and 18 deletions

View file

@ -1,3 +1,10 @@
2014-05-05 Jarek Czekalski <jarekczek@poczta.onet.pl>
Remove unneeded prompt when closing a buffer with active
emacsclient ("Buffer ... still has clients"), #16548.
* server.el (server-start): Remove the only call to:
(server-kill-buffer-query-function): Remove.
2014-05-04 Leo Liu <sdl.web@gmail.com>
* calendar/diary-lib.el (calendar-chinese-month-name-array):

View file

@ -642,8 +642,6 @@ server or call `M-x server-force-delete' to forcibly disconnect it.")
(cl-letf (((default-file-modes) ?\700))
(add-hook 'suspend-tty-functions 'server-handle-suspend-tty)
(add-hook 'delete-frame-functions 'server-handle-delete-frame)
(add-hook 'kill-buffer-query-functions
'server-kill-buffer-query-function)
(add-hook 'kill-emacs-query-functions
'server-kill-emacs-query-function)
(add-hook 'kill-emacs-hook 'server-force-stop) ;Cleanup upon exit.
@ -1472,22 +1470,6 @@ specifically for the clients and did not exist before their request for it."
(save-buffer)))
(server-buffer-done (current-buffer))))
;; Ask before killing a server buffer.
;; It was suggested to release its client instead,
;; but I think that is dangerous--the client would proceed
;; using whatever is on disk in that file. -- rms.
(defun server-kill-buffer-query-function ()
"Ask before killing a server buffer."
(or (not server-buffer-clients)
(let ((res t))
(dolist (proc server-buffer-clients)
(when (and (memq proc server-clients)
(eq (process-status proc) 'open))
(setq res nil)))
res)
(yes-or-no-p (format "Buffer `%s' still has clients; kill it? "
(buffer-name (current-buffer))))))
(defun server-kill-emacs-query-function ()
"Ask before exiting Emacs if it has live clients."
(or (not server-clients)