Mercurial > emacs
changeset 6993:0983fe01e614
(server-kill-emacs-query-function)
(server-kill-buffer-query-function): Give names to these hook fns.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 20 Apr 1994 20:26:25 +0000 |
parents | ed57331fb222 |
children | b43ec2effc1d |
files | lisp/server.el |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/server.el Wed Apr 20 20:04:20 1994 +0000 +++ b/lisp/server.el Wed Apr 20 20:26:25 1994 +0000 @@ -286,18 +286,19 @@ ;; 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)))))))) + 'server-kill-buffer-query-function) -(add-hook 'kill-emacs-query-functions - (function - (lambda () - (or (not server-clients) - (yes-or-no-p "Server buffers still have clients; exit anyway? "))))) +(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.