]> git.eshelyaron.com Git - emacs.git/commitdiff
(server-unload-function): Rename from `server-unload-hook' and
authorJuanma Barranquero <lekktu@gmail.com>
Mon, 29 Oct 2007 00:51:51 +0000 (00:51 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Mon, 29 Oct 2007 00:51:51 +0000 (00:51 +0000)
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
lisp/server.el

index de19ecb194aa12bd5cdb789a294c191bd934725e..da35e020e3d3cb5aefaa3789ebefdae11295a123 100644 (file)
@@ -1,3 +1,14 @@
+2007-10-29  Juanma Barranquero  <lekktu@gmail.com>
+
+       * 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  <rgm@gnu.org>
 
        * dirtrack.el (dirtrack-debug): Doc fix.
index 6d73bb6ee9b836d11f2d40c1dc8774164893c515..a1d34eb81284c7a6b54f1440d24fc76e86715b02 100644 (file)
@@ -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)
 \f
 (provide 'server)