summaryrefslogtreecommitdiff
path: root/lisp/server.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-05-20 23:48:12 +0000
committerRichard M. Stallman <rms@gnu.org>1994-05-20 23:48:12 +0000
commit8a5200db4bcdaf13ef3dfd2b8615a24a6acfdbed (patch)
tree113fc312127942c7a42e622de60271aa6baa452a /lisp/server.el
parent7665d461334515cb5e4077f24272629a08264dd9 (diff)
downloademacs-8a5200db4bcdaf13ef3dfd2b8615a24a6acfdbed.tar.gz
(server-done-hook): New hook.
(server-buffer-done): Run it.
Diffstat (limited to 'lisp/server.el')
-rw-r--r--lisp/server.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/server.el b/lisp/server.el
index 794f95e9039..1d175bfa7de 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -82,6 +82,9 @@
(defvar server-switch-hook nil
"*List of hooks to call when switching to a buffer for the Emacs server.")
+(defvar server-done-hook nil
+ "*List of hooks to call when done editing a buffer for the Emacs server.")
+
(defvar server-process nil
"the current server process")
@@ -250,7 +253,8 @@ as a suggestion for what to select next."
(progn
(save-excursion
(set-buffer buffer)
- (setq server-buffer-clients nil))
+ (setq server-buffer-clients nil)
+ (run-hooks 'server-done-hook))
(if (server-temp-file-p buffer)
(kill-buffer buffer)
(bury-buffer buffer))))