comparison lisp/server.el @ 2866:48ddb3600ae6

* server.el (server-switch-hook): New hook. (server-process-filter): Call it.
author Jim Blandy <jimb@redhat.com>
date Tue, 18 May 1993 22:15:14 +0000
parents f3554332993b
children 65d530f613a8
comparison
equal deleted inserted replaced
2865:427eadecebd6 2866:48ddb3600ae6
75 75
76 (defvar server-program "emacsserver" 76 (defvar server-program "emacsserver"
77 "*The program to use as the edit server") 77 "*The program to use as the edit server")
78 78
79 (defvar server-visit-hook nil 79 (defvar server-visit-hook nil
80 "*List of hooks to call when visiting a file for the Emacs server.")
81
82 (defvar server-switch-hook nil
80 "*List of hooks to call when switching to a buffer for the Emacs server.") 83 "*List of hooks to call when switching to a buffer for the Emacs server.")
81 84
82 (defvar server-process nil 85 (defvar server-process nil
83 "the current server process") 86 "the current server process")
84 87
179 (setq lineno 1)))) 182 (setq lineno 1))))
180 (server-visit-files files client) 183 (server-visit-files files client)
181 ;; CLIENT is now a list (CLIENTNUM BUFFERS...) 184 ;; CLIENT is now a list (CLIENTNUM BUFFERS...)
182 (setq server-clients (cons client server-clients)) 185 (setq server-clients (cons client server-clients))
183 (switch-to-buffer (nth 1 client)) 186 (switch-to-buffer (nth 1 client))
187 (run-hooks 'server-switch-hook)
184 (message (substitute-command-keys 188 (message (substitute-command-keys
185 "When done with a buffer, type \\[server-edit]."))))) 189 "When done with a buffer, type \\[server-edit].")))))
186 190
187 (defun server-visit-files (files client) 191 (defun server-visit-files (files client)
188 "Finds FILES and returns the list CLIENT with the buffers nconc'd. 192 "Finds FILES and returns the list CLIENT with the buffers nconc'd.