Mercurial > emacs
changeset 85741:29ea503e1863
(server-unload-function): Rename from `server-unload-hook' and
adapt to new `unload-feature' functionality. Remove hook from
`kill-buffer-hook' buffer-locally.
(server-unload-hook): Remove.
(server-unload-function): New var; replaces `server-unload-hook'.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Mon, 29 Oct 2007 00:50:41 +0000 |
parents | 018f2968e81d |
children | 4a5d6cd41d5f |
files | lisp/server.el |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/server.el Mon Oct 29 00:47:06 2007 +0000 +++ b/lisp/server.el Mon Oct 29 00:50:41 2007 +0000 @@ -1283,17 +1283,18 @@ (define-key ctl-x-map "#" 'server-edit) -(defun server-unload-hook () +(defun server-unload-function () "Unload the server library." (server-mode -1) - (remove-hook 'suspend-tty-functions 'server-handle-suspend-tty) - (remove-hook 'delete-frame-functions 'server-handle-delete-frame) - (remove-hook 'kill-buffer-query-functions 'server-kill-buffer-query-function) - (remove-hook 'kill-emacs-query-functions 'server-kill-emacs-query-function) - (remove-hook 'kill-buffer-hook 'server-kill-buffer)) + (save-current-buffer + (dolist (buffer (buffer-list)) + (set-buffer buffer) + (remove-hook 'kill-buffer-hook 'server-kill-buffer t))) + ;; continue standard unloading + nil) (add-hook 'kill-emacs-hook (lambda () (server-mode -1))) ;Cleanup upon exit. -(add-hook 'server-unload-hook 'server-unload-hook) +(defvar server-unload-function 'server-unload-function) (provide 'server)