1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00

(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'.
This commit is contained in:
Juanma Barranquero 2007-10-29 00:44:52 +00:00
parent 9d097e6a4a
commit e6fd13de4a
2 changed files with 20 additions and 5 deletions

View File

@ -1,3 +1,14 @@
2007-10-29 Juanma Barranquero <lekktu@gmail.com>
* loadhist.el (unload-feature-special-hooks):
Add `delete-frame-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-27 Juanma Barranquero <lekktu@gmail.com>
* desktop.el (uniquify-managed): Pacify byte compiler.

View File

@ -764,14 +764,18 @@ Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it."
(define-key ctl-x-map "#" 'server-edit)
(defun server-unload-hook ()
(defun server-unload-function ()
"Unload the server library."
(server-mode -1)
(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)