Commit 88fd26a1 authored by Juanma Barranquero's avatar Juanma Barranquero

(server-log-time-function): New function.

(server-log): Use it.
parent a1e81396
2008-01-21 Juanma Barranquero <>
* server.el (server-log-time-function): New function.
(server-log): Use it.
2008-01-21 Glenn Morris <>
* progmodes/hideif.el: Move defcustoms and defface to start of file.
......@@ -291,17 +291,20 @@ If NOFRAME is non-nil, let the frames live. (To be used from
(server-log "Deleted" proc))))
(defvar server-log-time-function 'current-time-string
"Function to generate timestamps for the *server* buffer.")
(defun server-log (string &optional client)
"If a *server* buffer exists, write STRING to it for logging purposes.
If CLIENT is non-nil, add a description of it to the logged message."
(when (get-buffer "*server*")
(with-current-buffer "*server*"
(goto-char (point-max))
(insert (current-time-string)
(insert (funcall server-log-time-function)
((null client) " ")
((listp client) (format " %s: " (car client)))
(t (format " %s: " client)))
((null client) " ")
((listp client) (format " %s: " (car client)))
(t (format " %s: " client)))
(or (bolp) (newline)))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment