diff options
| author | Richard M. Stallman | 1994-04-20 20:26:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-04-20 20:26:25 +0000 |
| commit | 03d786655ba777f5d73a36cb4e6a308c22676609 (patch) | |
| tree | a32c3f7376b1106e106c59f0b78f38784943cdbe | |
| parent | f3309b68f7ee5b9e44b8996d934c120f883026f2 (diff) | |
| download | emacs-03d786655ba777f5d73a36cb4e6a308c22676609.tar.gz emacs-03d786655ba777f5d73a36cb4e6a308c22676609.zip | |
(server-kill-emacs-query-function)
(server-kill-buffer-query-function): Give names to these hook fns.
| -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." | |||
| 286 | ;; If a server buffer is killed, release its client. | 286 | ;; If a server buffer is killed, release its client. |
| 287 | ;; I'm not sure this is really a good idea--do you want the client | 287 | ;; I'm not sure this is really a good idea--do you want the client |
| 288 | ;; to proceed using whatever is on disk in that file? | 288 | ;; to proceed using whatever is on disk in that file? |
| 289 | (defun server-kill-buffer-query-function () | ||
| 290 | (or (not server-buffer-clients) | ||
| 291 | (yes-or-no-p (format "Buffer `%s' still has clients; kill it? " | ||
| 292 | (buffer-name (current-buffer)))))) | ||
| 293 | |||
| 289 | (add-hook 'kill-buffer-query-functions | 294 | (add-hook 'kill-buffer-query-functions |
| 290 | (function | 295 | 'server-kill-buffer-query-function) |
| 291 | (lambda () | 296 | |
| 292 | (or (not server-buffer-clients) | 297 | (defun server-kill-emacs-query-function () |
| 293 | (yes-or-no-p (format "Buffer `%s' still has clients; kill it? " | 298 | (or (not server-clients) |
| 294 | (buffer-name (current-buffer)))))))) | 299 | (yes-or-no-p "Server buffers still have clients; exit anyway? "))) |
| 295 | 300 | ||
| 296 | (add-hook 'kill-emacs-query-functions | 301 | (add-hook 'kill-emacs-query-functions 'server-kill-emacs-query-function) |
| 297 | (function | ||
| 298 | (lambda () | ||
| 299 | (or (not server-clients) | ||
| 300 | (yes-or-no-p "Server buffers still have clients; exit anyway? "))))) | ||
| 301 | 302 | ||
| 302 | (defun server-edit (&optional arg) | 303 | (defun server-edit (&optional arg) |
| 303 | "Switch to next server editing buffer; say \"Done\" for current buffer. | 304 | "Switch to next server editing buffer; say \"Done\" for current buffer. |