1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

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.
This commit is contained in:
Neil Jerram 2009-08-27 22:22:34 +01:00
parent ba5f8bf4b1
commit c0d316cce7

View file

@ -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))