1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Fix GDS utility client startup

* emacs/gds-scheme.el (gds-start-utility-guile): Use buffer-local
  variable gds-client instead of client, as client is actually unbound
  when the process-filter lambda runs.  (i.e. This isn't Scheme code!)
This commit is contained in:
Neil Jerram 2009-08-28 00:29:04 +01:00
parent 1505848425
commit a27173cf78

View file

@ -206,8 +206,7 @@ Emacs to display an error or trap so that the user can debug it."
"-q" "-q"
"--debug" "--debug"
"-c" "-c"
code)) code)))
(client nil))
;; Note that this process can be killed automatically on Emacs ;; Note that this process can be killed automatically on Emacs
;; exit. ;; exit.
(process-kill-without-query proc) (process-kill-without-query proc)
@ -217,17 +216,18 @@ Emacs to display an error or trap so that the user can debug it."
(if (process-buffer proc) (if (process-buffer proc)
(with-current-buffer (process-buffer proc) (with-current-buffer (process-buffer proc)
(insert string) (insert string)
(or client (or gds-client
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))
(setq client (condition-case nil (setq gds-client
(read (current-buffer)) (condition-case nil
(error nil))))))))) (read (current-buffer))
(error nil)))))))))
;; Accept output from the new process until we have its number. ;; Accept output from the new process until we have its number.
(while (not client) (while (not (with-current-buffer (process-buffer proc) gds-client))
(accept-process-output proc)) (accept-process-output proc))
;; Return the new process's client number. ;; Return the new process's client number.
client)) (with-current-buffer (process-buffer proc) gds-client)))
;;;; Evaluating code. ;;;; Evaluating code.