aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-06-28 10:02:03 +0000
committerRichard M. Stallman1995-06-28 10:02:03 +0000
commit7e721a4fba8eeb722904cf71e42cf8f3f56ac878 (patch)
tree471ef42b7f68a353236c767f9f2b200c251df948
parentb6f0fe04c00c3555438b2019e7154ffd3270701a (diff)
downloademacs-7e721a4fba8eeb722904cf71e42cf8f3f56ac878.tar.gz
emacs-7e721a4fba8eeb722904cf71e42cf8f3f56ac878.zip
(server-process-filter): Detect error messages from server.
-rw-r--r--lisp/server.el44
1 files changed, 23 insertions, 21 deletions
diff --git a/lisp/server.el b/lisp/server.el
index aa870b0e7b1..cba3629b85f 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -180,27 +180,29 @@ Prefix arg means just kill any existing server communications subprocess."
180 (lineno 1)) 180 (lineno 1))
181 ;; Remove this line from STRING. 181 ;; Remove this line from STRING.
182 (setq string (substring string (match-end 0))) 182 (setq string (substring string (match-end 0)))
183 (if (string-match "^Client: " request) 183 (if (string-match "^Error: " request)
184 (setq request (substring request (match-end 0)))) 184 (message (concat "Server error: " (substring request (match-end 0))))
185 (setq client (list (substring request 0 (string-match " " request)))) 185 (if (string-match "^Client: " request)
186 (setq request (substring request (match-end 0))) 186 (setq request (substring request (match-end 0))))
187 (while (string-match "[^ ]+ " request) 187 (setq client (list (substring request 0 (string-match " " request))))
188 (let ((arg 188 (setq request (substring request (match-end 0)))
189 (substring request (match-beginning 0) (1- (match-end 0))))) 189 (while (string-match "[^ ]+ " request)
190 (setq request (substring request (match-end 0))) 190 (let ((arg
191 (if (string-match "\\`\\+[0-9]+\\'" arg) 191 (substring request (match-beginning 0) (1- (match-end 0)))))
192 (setq lineno (read (substring arg 1))) 192 (setq request (substring request (match-end 0)))
193 (setq files 193 (if (string-match "\\`\\+[0-9]+\\'" arg)
194 (cons (list arg lineno) 194 (setq lineno (read (substring arg 1)))
195 files)) 195 (setq files
196 (setq lineno 1)))) 196 (cons (list arg lineno)
197 (server-visit-files files client) 197 files))
198 ;; CLIENT is now a list (CLIENTNUM BUFFERS...) 198 (setq lineno 1))))
199 (setq server-clients (cons client server-clients)) 199 (server-visit-files files client)
200 (server-switch-buffer (nth 1 client)) 200 ;; CLIENT is now a list (CLIENTNUM BUFFERS...)
201 (run-hooks 'server-switch-hook) 201 (setq server-clients (cons client server-clients))
202 (message (substitute-command-keys 202 (server-switch-buffer (nth 1 client))
203 "When done with a buffer, type \\[server-edit].")))) 203 (run-hooks 'server-switch-hook)
204 (message (substitute-command-keys
205 "When done with a buffer, type \\[server-edit]")))))
204 ;; Save for later any partial line that remains. 206 ;; Save for later any partial line that remains.
205 (setq server-previous-string string)) 207 (setq server-previous-string string))
206 208