summaryrefslogtreecommitdiff
path: root/lisp/server.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2007-10-29 00:51:51 +0000
committerJuanma Barranquero <lekktu@gmail.com>2007-10-29 00:51:51 +0000
commit08446d5eeb448b3473daa4e209ccf71ceef496b5 (patch)
tree64b41f16b59f4308b5875a7e25e9e2e2aeae63c6 /lisp/server.el
parentb09ee19d0b000e2a451dcbcf2506280e305fe9d6 (diff)
downloademacs-08446d5eeb448b3473daa4e209ccf71ceef496b5.tar.gz
(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'.
Diffstat (limited to 'lisp/server.el')
-rw-r--r--lisp/server.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/server.el b/lisp/server.el
index 6d73bb6ee9b..a1d34eb8128 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1283,17 +1283,18 @@ only these files will be asked to be saved."
(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)