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
commitf9b3ef8860a5ca03eb9d2e1739ef9456e9670a66 (patch)
treeab0c3fe942a6565f46f1758359346ea89cd75265 /lisp/server.el
parentff7dc6f6719596aabd0b2688fdfdfcc4f48066dd (diff)
downloademacs-f9b3ef8860a5ca03eb9d2e1739ef9456e9670a66.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))))