From 56e6cc31de573d15f55f369a5759930a351df884 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 4 Jul 2011 03:04:29 +0200 Subject: [PATCH] lisp/server.el (server-eval-and-print): Return any result, even nil. --- lisp/ChangeLog | 8 ++++++-- lisp/server.el | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0dc4ca5e4ec..5e74c9604fd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-07-04 Juanma Barranquero + + * server.el (server-eval-and-print): Return any result, even nil. + 2011-07-03 Paul Eggert * type-break.el: Accept time formats that the builtins accept. @@ -42,7 +46,7 @@ * isearch.el (isearch-search-fun-function): Clarify the doc string (bug#8101). -2011-07-03 Richard Kim (tiny change) +2011-07-03 Richard Kim (tiny change) * textmodes/texnfo-upd.el (texinfo-insert-menu): Don't insert unnecessary spaces (bug#8987). @@ -508,7 +512,7 @@ (ses-cell-symbol): Set macro as safe, so that it can be used in formulas. - * ses.el: Update cycle detection algorithm. + * ses.el: Update cycle detection algorithm. (ses-localvars): Add ses--Dijkstra-attempt-nb and ses--Dijkstra-weight-bound, and initial values thereof when applicable. (ses-set-localvars): New function. diff --git a/lisp/server.el b/lisp/server.el index 42da7a210c5..36b137b7bc9 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -679,7 +679,7 @@ Server mode runs a process that accepts commands from the (defun server-eval-and-print (expr proc) "Eval EXPR and send the result back to client PROC." (let ((v (eval (car (read-from-string expr))))) - (when (and v proc) + (when proc (with-temp-buffer (let ((standard-output (current-buffer))) (pp v) @@ -1200,12 +1200,12 @@ so don't mark these buffers specially, just visit them normally." (add-to-history 'file-name-history filen) (if (null obuf) (progn - (run-hooks 'pre-command-hook) + (run-hooks 'pre-command-hook) (set-buffer (find-file-noselect filen))) (set-buffer obuf) ;; separately for each file, in sync with post-command hooks, ;; with the new buffer current: - (run-hooks 'pre-command-hook) + (run-hooks 'pre-command-hook) (cond ((file-exists-p filen) (when (not (verify-visited-file-modtime obuf)) (revert-buffer t nil))) @@ -1219,7 +1219,7 @@ so don't mark these buffers specially, just visit them normally." (server-goto-line-column (cdr file)) (run-hooks 'server-visit-hook) ;; hooks may be specific to current buffer: - (run-hooks 'post-command-hook)) + (run-hooks 'post-command-hook)) (unless nowait ;; When the buffer is killed, inform the clients. (add-hook 'kill-buffer-hook 'server-kill-buffer nil t) -- 2.39.2