]> code.delx.au - gnu-emacs/commitdiff
(server-process-filter): Handle errors during
authorAndreas Schwab <schwab@suse.de>
Sat, 4 Mar 2006 16:07:12 +0000 (16:07 +0000)
committerAndreas Schwab <schwab@suse.de>
Sat, 4 Mar 2006 16:07:12 +0000 (16:07 +0000)
evaluation of the argument.

lisp/ChangeLog
lisp/server.el

index 61808a4c4238729375e2cbc9ec7f91d28a5d0b6b..57fb4486ee0fddc13b24350f2162b5fe8e7685b1 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-04  Andreas Schwab  <schwab@suse.de>
+
+       * server.el (server-process-filter): Handle errors during
+       evaluation of the argument.
+
 2006-03-03  John Paul Wallington  <jpw@pobox.com>
 
        * t-mouse.el (t-mouse-drag-start, t-mouse-swap-alt-keys): Doc fix;
index 4d461876e307a462922bf19ccc9398a385d8dd1c..befcd22ad3afa35c2c0cc44640cc00d3ca16e865 100644 (file)
@@ -343,10 +343,14 @@ PROC is the server process.  Format of STRING is \"PATH PATH PATH... \\n\"."
            (if coding-system
                (setq arg (decode-coding-string arg coding-system)))
            (if eval
-               (let ((v (eval (car (read-from-string arg)))))
+               (let* (errorp
+                      (v (condition-case errobj
+                            (eval (car (read-from-string arg)))
+                          (error (setq errorp t) errobj))))
                  (when v
                    (with-temp-buffer
                      (let ((standard-output (current-buffer)))
+                       (if errorp (princ "error: "))
                        (pp v)
                        ;; Suppress the error rose when the pipe to PROC is closed.
                        (condition-case err