emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

server-eval-and-print only returns non-nil values


From: Juanma Barranquero
Subject: server-eval-and-print only returns non-nil values
Date: Sun, 3 Jul 2011 15:38:09 +0200

Is there any reason why server-eval-and-print only returns non-nil values?

  C:\> emacsclient -e "(file-exists-p \"C:/\")"
  t

  C:> emacsclient -e "(file-exists-p \"Z:/\")"

  C:>


If not, I'd like to fix it with the trivial patch below.

    Juanma



2011-07-03  Juanma Barranquero  <address@hidden>

        * server.el (server-eval-and-print): Return any result, even nil.


=== modified file 'lisp/server.el'
--- lisp/server.el      2011-06-25 18:05:48 +0000
+++ lisp/server.el      2011-07-03 13:33:25 +0000
@@ -679,7 +679,7 @@
 (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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]