diff options
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/server.el | 11 |
3 files changed, 16 insertions, 3 deletions
| @@ -1237,8 +1237,9 @@ passing the hook functions as arguments to a "wrapping" function. | |||
| 1237 | *** New macro `with-wrapper-hook' for running an abnormal hook as a | 1237 | *** New macro `with-wrapper-hook' for running an abnormal hook as a |
| 1238 | set of "wrapping" filters, similar to around advice. | 1238 | set of "wrapping" filters, similar to around advice. |
| 1239 | 1239 | ||
| 1240 | ** `server-eval-at' is provided to allow evaluating forms on different | 1240 | +++ |
| 1241 | Emacs server instances. | 1241 | ** The new function `server-eval-at' allows evaluation of Lisp forms on |
| 1242 | named Emacs server instances, using TCP sockets. | ||
| 1242 | 1243 | ||
| 1243 | +++ | 1244 | +++ |
| 1244 | ** `call-process' and `call-process-region' allow a `(:file "file")' spec | 1245 | ** `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 @@ | |||
| 1 | 2012-02-02 Glenn Morris <rgm@gnu.org> | 1 | 2012-02-02 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * server.el (server-auth-dir): Doc fix. | ||
| 4 | (server-eval-at): Doc fix. Give an explicit error if !server-use-tcp. | ||
| 5 | |||
| 3 | * subr.el (run-mode-hooks): Doc fix. | 6 | * subr.el (run-mode-hooks): Doc fix. |
| 4 | 7 | ||
| 5 | 2012-02-02 Juri Linkov <juri@jurta.org> | 8 | 2012-02-02 Juri Linkov <juri@jurta.org> |
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." | |||
| 126 | 126 | ||
| 127 | (defcustom server-auth-dir (locate-user-emacs-file "server/") | 127 | (defcustom server-auth-dir (locate-user-emacs-file "server/") |
| 128 | "Directory for server authentication files. | 128 | "Directory for server authentication files. |
| 129 | We only use this if `server-use-tcp' is non-nil. | ||
| 130 | Otherwise we use `server-socket-dir'. | ||
| 129 | 131 | ||
| 130 | NOTE: On FAT32 filesystems, directories are not secure; | 132 | NOTE: On FAT32 filesystems, directories are not secure; |
| 131 | files can be read and modified by any user or process. | 133 | files can be read and modified by any user or process. |
| @@ -1525,7 +1527,14 @@ only these files will be asked to be saved." | |||
| 1525 | nil) | 1527 | nil) |
| 1526 | 1528 | ||
| 1527 | (defun server-eval-at (server form) | 1529 | (defun server-eval-at (server form) |
| 1528 | "Eval FORM on Emacs Server SERVER." | 1530 | "Contact the Emacs server named SERVER and evaluate FORM there. |
| 1531 | Returns the result of the evaluation, or signals an error if it | ||
| 1532 | cannot contact the specified server. For example: | ||
| 1533 | \(server-eval-at \"server\" '(emacs-pid)) | ||
| 1534 | returns the process ID of the Emacs instance running \"server\". | ||
| 1535 | This function requires the use of TCP sockets. " | ||
| 1536 | (or server-use-tcp | ||
| 1537 | (error "This function requires TCP sockets")) | ||
| 1529 | (let ((auth-file (expand-file-name server server-auth-dir)) | 1538 | (let ((auth-file (expand-file-name server server-auth-dir)) |
| 1530 | (coding-system-for-read 'binary) | 1539 | (coding-system-for-read 'binary) |
| 1531 | (coding-system-for-write 'binary) | 1540 | (coding-system-for-write 'binary) |