Mercurial > emacs
comparison lisp/server.el @ 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 | 1371d69e89bb |
children | cc7cd83ccf3f |
comparison
equal
deleted
inserted
replaced
6992:ed57331fb222 | 6993:0983fe01e614 |
---|---|
284 (or (server-buffer-done buffer) suggested-buffer))))) | 284 (or (server-buffer-done buffer) suggested-buffer))))) |
285 | 285 |
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. |
304 If a server buffer is current, it is marked \"done\" and optionally saved. | 305 If a server buffer is current, it is marked \"done\" and optionally saved. |
305 When all of a client's buffers are marked as \"done\", the client is notified. | 306 When all of a client's buffers are marked as \"done\", the client is notified. |