From: Glenn Morris Date: Thu, 2 Feb 2012 07:48:39 +0000 (-0800) Subject: server.el doc fixes X-Git-Tag: emacs-pretest-24.0.94~360^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=953cebf5a8bde005bf7e56fd2ab31a32f32a3586;p=emacs.git server.el doc fixes * lisp/server.el (server-auth-dir): Doc fix. (server-eval-at): Doc fix. Give an explicit error if !server-use-tcp. * etc/NEWS: Markup. --- diff --git a/etc/NEWS b/etc/NEWS index 7bf9a1c36c4..d4acdd3f84e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1237,8 +1237,9 @@ passing the hook functions as arguments to a "wrapping" function. *** New macro `with-wrapper-hook' for running an abnormal hook as a set of "wrapping" filters, similar to around advice. -** `server-eval-at' is provided to allow evaluating forms on different -Emacs server instances. ++++ +** The new function `server-eval-at' allows evaluation of Lisp forms on +named Emacs server instances, using TCP sockets. +++ ** `call-process' and `call-process-region' allow a `(:file "file")' spec diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4290c5e820d..9a4132fa3a6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-02-02 Glenn Morris + * server.el (server-auth-dir): Doc fix. + (server-eval-at): Doc fix. Give an explicit error if !server-use-tcp. + * subr.el (run-mode-hooks): Doc fix. 2012-02-02 Juri Linkov diff --git a/lisp/server.el b/lisp/server.el index 9dcd1f3b1d9..a08f971e88c 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -126,6 +126,8 @@ port number." (defcustom server-auth-dir (locate-user-emacs-file "server/") "Directory for server authentication files. +We only use this if `server-use-tcp' is non-nil. +Otherwise we use `server-socket-dir'. NOTE: On FAT32 filesystems, directories are not secure; files can be read and modified by any user or process. @@ -1525,7 +1527,14 @@ only these files will be asked to be saved." nil) (defun server-eval-at (server form) - "Eval FORM on Emacs Server SERVER." + "Contact the Emacs server named SERVER and evaluate FORM there. +Returns the result of the evaluation, or signals an error if it +cannot contact the specified server. For example: + \(server-eval-at \"server\" '(emacs-pid)) +returns the process ID of the Emacs instance running \"server\". +This function requires the use of TCP sockets. " + (or server-use-tcp + (error "This function requires TCP sockets")) (let ((auth-file (expand-file-name server server-auth-dir)) (coding-system-for-read 'binary) (coding-system-for-write 'binary)