diff options
| author | Jarek Czekalski | 2014-05-05 09:35:50 +0200 |
|---|---|---|
| committer | Jarek Czekalski | 2014-05-05 09:35:50 +0200 |
| commit | 80e377c0d02bcacd636465ff1a169cf4ebafeec3 (patch) | |
| tree | 0427e7cf6d9708c307ae7099a886f3be9787858b | |
| parent | 3ea33e321527f3892f666b47becc51340b4b9c92 (diff) | |
| download | emacs-80e377c0d02bcacd636465ff1a169cf4ebafeec3.tar.gz emacs-80e377c0d02bcacd636465ff1a169cf4ebafeec3.zip | |
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
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/server.el | 18 |
2 files changed, 7 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c0fe9c69f67..59f41b05bd9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-05-05 Jarek Czekalski <jarekczek@poczta.onet.pl> | ||
| 2 | |||
| 3 | Remove unneeded prompt when closing a buffer with active | ||
| 4 | emacsclient ("Buffer ... still has clients"), #16548. | ||
| 5 | * server.el (server-start): Remove the only call to: | ||
| 6 | (server-kill-buffer-query-function): Remove. | ||
| 7 | |||
| 1 | 2014-05-04 Leo Liu <sdl.web@gmail.com> | 8 | 2014-05-04 Leo Liu <sdl.web@gmail.com> |
| 2 | 9 | ||
| 3 | * calendar/diary-lib.el (calendar-chinese-month-name-array): | 10 | * calendar/diary-lib.el (calendar-chinese-month-name-array): |
diff --git a/lisp/server.el b/lisp/server.el index 0c645889d75..681d93d6f5d 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -642,8 +642,6 @@ server or call `M-x server-force-delete' to forcibly disconnect it.") | |||
| 642 | (cl-letf (((default-file-modes) ?\700)) | 642 | (cl-letf (((default-file-modes) ?\700)) |
| 643 | (add-hook 'suspend-tty-functions 'server-handle-suspend-tty) | 643 | (add-hook 'suspend-tty-functions 'server-handle-suspend-tty) |
| 644 | (add-hook 'delete-frame-functions 'server-handle-delete-frame) | 644 | (add-hook 'delete-frame-functions 'server-handle-delete-frame) |
| 645 | (add-hook 'kill-buffer-query-functions | ||
| 646 | 'server-kill-buffer-query-function) | ||
| 647 | (add-hook 'kill-emacs-query-functions | 645 | (add-hook 'kill-emacs-query-functions |
| 648 | 'server-kill-emacs-query-function) | 646 | 'server-kill-emacs-query-function) |
| 649 | (add-hook 'kill-emacs-hook 'server-force-stop) ;Cleanup upon exit. | 647 | (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." | |||
| 1472 | (save-buffer))) | 1470 | (save-buffer))) |
| 1473 | (server-buffer-done (current-buffer)))) | 1471 | (server-buffer-done (current-buffer)))) |
| 1474 | 1472 | ||
| 1475 | ;; Ask before killing a server buffer. | ||
| 1476 | ;; It was suggested to release its client instead, | ||
| 1477 | ;; but I think that is dangerous--the client would proceed | ||
| 1478 | ;; using whatever is on disk in that file. -- rms. | ||
| 1479 | (defun server-kill-buffer-query-function () | ||
| 1480 | "Ask before killing a server buffer." | ||
| 1481 | (or (not server-buffer-clients) | ||
| 1482 | (let ((res t)) | ||
| 1483 | (dolist (proc server-buffer-clients) | ||
| 1484 | (when (and (memq proc server-clients) | ||
| 1485 | (eq (process-status proc) 'open)) | ||
| 1486 | (setq res nil))) | ||
| 1487 | res) | ||
| 1488 | (yes-or-no-p (format "Buffer `%s' still has clients; kill it? " | ||
| 1489 | (buffer-name (current-buffer)))))) | ||
| 1490 | |||
| 1491 | (defun server-kill-emacs-query-function () | 1473 | (defun server-kill-emacs-query-function () |
| 1492 | "Ask before exiting Emacs if it has live clients." | 1474 | "Ask before exiting Emacs if it has live clients." |
| 1493 | (or (not server-clients) | 1475 | (or (not server-clients) |