lisp/server.el: Catch quit and close the connection (bug#8942).

This commit is contained in:
Juanma Barranquero 2011-07-05 00:40:03 +02:00
parent 13aa217bac
commit b768cdcd31
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2011-07-04 Juanma Barranquero <lekktu@gmail.com>
* server.el (server-execute): Catch quit and call
`server-return-error' to pass the error back to emacsclient and
close the connection (bug#8942).
2011-07-04 Ken Manheimer <ken.manheimer@gmail.com>
* allout.el (allout-encrypt-unencrypted-on-saves): Do not provide

View file

@ -1153,7 +1153,10 @@ The following commands are accepted by the client:
"When done with a buffer, type \\[server-edit]")))))
(when (and frame (null tty-name))
(server-unselect-display frame)))
(error (server-return-error proc err)))))
((quit error)
(when (eq (car err) 'quit)
(message "Quit emacsclient request"))
(server-return-error proc err)))))
(defun server-return-error (proc err)
(ignore-errors