summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2009-08-27 22:22:34 +0100
committerNeil Jerram <neil@ossau.uklinux.net>2009-08-27 22:22:34 +0100
commitc0d316cce78b317b68dc3dc590256ef832721a2b (patch)
tree8d7285ae3ffe837f743a8d6bc92b153f3eb5a72b
parentba5f8bf4b1ff19871222d832a446c5e54da64b93 (diff)
Make GDS resilient to autocompilation comments
* emacs/gds-scheme.el (gds-start-utility-guile): Make the extraction of client number more robust; in particular when the client emits comments (about auto compilation) before the number.
-rwxr-xr-xemacs/gds-scheme.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/emacs/gds-scheme.el b/emacs/gds-scheme.el
index 54c75a787..798b10702 100755
--- a/emacs/gds-scheme.el
+++ b/emacs/gds-scheme.el
@@ -214,10 +214,15 @@ Emacs to display an error or trap so that the user can debug it."
;; Set up a process filter to catch the new client's number.
(set-process-filter proc
(lambda (proc string)
- (setq client (string-to-number string))
(if (process-buffer proc)
(with-current-buffer (process-buffer proc)
- (insert string)))))
+ (insert string)
+ (or client
+ (save-excursion
+ (goto-char (point-min))
+ (setq client (condition-case nil
+ (read (current-buffer))
+ (error nil)))))))))
;; Accept output from the new process until we have its number.
(while (not client)
(accept-process-output proc))