From 08446d5eeb448b3473daa4e209ccf71ceef496b5 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 29 Oct 2007 00:51:51 +0000 Subject: [PATCH] (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'. --- lisp/ChangeLog | 11 +++++++++++ lisp/server.el | 15 ++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index de19ecb194a..da35e020e3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2007-10-29 Juanma Barranquero + + * loadhist.el (unload-feature-special-hooks): + Add `delete-frame-functions' and `suspend-tty-functions'. + + * server.el (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'. + 2007-10-29 Glenn Morris * dirtrack.el (dirtrack-debug): Doc fix. 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) -- 2.39.2