diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 12 | ||||
-rw-r--r-- | lisp/image-mode.el | 2 | ||||
-rw-r--r-- | lisp/server.el | 11 | ||||
-rw-r--r-- | lisp/subr.el | 10 |
4 files changed, 29 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6c89f4e528d..7b1c34b2b6c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2012-02-02 Glenn Morris <rgm@gnu.org> + + * 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 <juri@jurta.org> + + * image-mode.el (image-toggle-display-image): Remove tautological + `major-mode' from the `derived-mode-p' test. + 2012-02-02 Kenichi Handa <handa@m17n.org> * (compose-region): Cancel previous change. diff --git a/lisp/image-mode.el b/lisp/image-mode.el index a9a8d15e6a0..953cb9e94a1 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -482,7 +482,7 @@ Remove text properties that display the image." "Show the image of the image file. Turn the image data into a real image, but only if the whole file was inserted." - (unless (derived-mode-p 'image-mode major-mode) + (unless (derived-mode-p 'image-mode) (error "The buffer is not in Image mode")) (let* ((filename (buffer-file-name)) (data-p (not (and filename 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) diff --git a/lisp/subr.el b/lisp/subr.el index c9e213c86a0..36bca654208 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1539,10 +1539,12 @@ if it is empty or a duplicate." (defun run-mode-hooks (&rest hooks) "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. -Execution is delayed if the variable `delay-mode-hooks' is non-nil. -Otherwise, runs the mode hooks and then `after-change-major-mode-hook'. -Major mode functions should use this instead of `run-hooks' when running their -FOO-mode-hook." +If the variable `delay-mode-hooks' is non-nil, does not run any hooks, +just adds the HOOKS to the list `delayed-mode-hooks'. +Otherwise, runs hooks in the sequence: `change-major-mode-after-body-hook', +`delayed-mode-hooks' (in reverse order), HOOKS, and finally +`after-change-major-mode-hook'. Major mode functions should use +this instead of `run-hooks' when running their FOO-mode-hook." (if delay-mode-hooks ;; Delaying case. (dolist (hook hooks) |