diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-04-20 20:26:25 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-04-20 20:26:25 +0000 |
commit | 03d786655ba777f5d73a36cb4e6a308c22676609 (patch) | |
tree | a32c3f7376b1106e106c59f0b78f38784943cdbe /lisp/server.el | |
parent | f3309b68f7ee5b9e44b8996d934c120f883026f2 (diff) | |
download | emacs-03d786655ba777f5d73a36cb4e6a308c22676609.tar.gz |
(server-kill-emacs-query-function)
(server-kill-buffer-query-function): Give names to these hook fns.
Diffstat (limited to 'lisp/server.el')
-rw-r--r-- | lisp/server.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/server.el b/lisp/server.el index 48285a0ee89..4fba0ec8d0c 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -286,18 +286,19 @@ Then bury it, and return a suggested buffer to select next." ;; If a server buffer is killed, release its client. ;; I'm not sure this is really a good idea--do you want the client ;; to proceed using whatever is on disk in that file? +(defun server-kill-buffer-query-function () + (or (not server-buffer-clients) + (yes-or-no-p (format "Buffer `%s' still has clients; kill it? " + (buffer-name (current-buffer)))))) + (add-hook 'kill-buffer-query-functions - (function - (lambda () - (or (not server-buffer-clients) - (yes-or-no-p (format "Buffer `%s' still has clients; kill it? " - (buffer-name (current-buffer)))))))) - -(add-hook 'kill-emacs-query-functions - (function - (lambda () - (or (not server-clients) - (yes-or-no-p "Server buffers still have clients; exit anyway? "))))) + 'server-kill-buffer-query-function) + +(defun server-kill-emacs-query-function () + (or (not server-clients) + (yes-or-no-p "Server buffers still have clients; exit anyway? "))) + +(add-hook 'kill-emacs-query-functions 'server-kill-emacs-query-function) (defun server-edit (&optional arg) "Switch to next server editing buffer; say \"Done\" for current buffer. |