diff options
author | Neil Jerram <neil@ossau.uklinux.net> | 2004-02-25 19:10:07 +0000 |
---|---|---|
committer | Neil Jerram <neil@ossau.uklinux.net> | 2004-02-25 19:10:07 +0000 |
commit | 7f05d32538e599de5130feb9eb21fe2dd1a43a2f (patch) | |
tree | 240fc55c788fb2b9f9e161d56cc0898afb5ef052 /emacs | |
parent | 72ea45ac4c7343fc62368dbc46d4f8f9fc0853a4 (diff) |
* gds-client.scm (handle-instruction-1): In `eval' protocol, catch
and report read errors nicely.
* gds.el (gds-display-buffers): Don't select the GDS window.
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/ChangeLog | 7 | ||||
-rw-r--r-- | emacs/gds-client.scm | 57 | ||||
-rw-r--r-- | emacs/gds.el | 6 |
3 files changed, 45 insertions, 25 deletions
diff --git a/emacs/ChangeLog b/emacs/ChangeLog index 4e3f8c79b..00f6ad007 100644 --- a/emacs/ChangeLog +++ b/emacs/ChangeLog @@ -1,3 +1,10 @@ +2004-02-25 Neil Jerram <neil@ossau.uklinux.net> + + * gds-client.scm (handle-instruction-1): In `eval' protocol, catch + and report read errors nicely. + + * gds.el (gds-display-buffers): Don't select the GDS window. + 2004-02-22 Neil Jerram <neil@ossau.uklinux.net> * Makefile.am (EXTRA_DIST): Distribute new files. diff --git a/emacs/gds-client.scm b/emacs/gds-client.scm index 12ab234f8..c1714a22d 100644 --- a/emacs/gds-client.scm +++ b/emacs/gds-client.scm @@ -411,26 +411,43 @@ decimal IP address where the UI server is running; default is (set-port-line! (current-input-port) line) (set-port-column! (current-input-port) column) (let ((m (and module (resolve-module-from-root module)))) - (let loop ((exprs '()) (x (read))) - (if (eof-object? x) - ;; Expressions to be evaluated have all been - ;; read. Now hand them off to an - ;; eval-thread for the actual evaluation. - (with-mutex eval-work-mutex - (trc 'protocol-thread "evaluation work available") - (set! eval-work (cons* correlator m (reverse! exprs))) - (set! eval-work-available #t) - (broadcast-condition-variable eval-work-changed) - (wait-condition-variable eval-work-taken - eval-work-mutex) - (assert (not eval-work-available)) - (trc 'protocol-thread "evaluation work underway")) - ;; Another complete expression read. Set - ;; breakpoints in the read code as specified - ;; by bpinfo, and add it to the list. - (begin - (install-breakpoints x bpinfo) - (loop (cons x exprs) (read))))))))) + (catch 'read-error + (lambda () + (let loop ((exprs '()) (x (read))) + (if (eof-object? x) + ;; Expressions to be evaluated have all + ;; been read. Now hand them off to an + ;; eval-thread for the actual + ;; evaluation. + (with-mutex eval-work-mutex + (trc 'protocol-thread + "evaluation work available") + (set! eval-work + (cons* correlator m (reverse! exprs))) + (set! eval-work-available #t) + (broadcast-condition-variable eval-work-changed) + (wait-condition-variable eval-work-taken + eval-work-mutex) + (assert (not eval-work-available)) + (trc 'protocol-thread + "evaluation work underway")) + ;; Another complete expression read. + ;; Set breakpoints in the read code as + ;; specified by bpinfo, and add it to + ;; the list. + (begin + (install-breakpoints x bpinfo) + (loop (cons x exprs) (read)))))) + (lambda (key . args) + (write-form `(eval-results + ,correlator + ,(with-output-to-string + (lambda () + (display ";;; Reading expressions") + (display " to evaluate\n") + (apply display-error #f + (current-output-port) args))) + ("error-in-read"))))))))) (cdr ins)) state) ((complete) diff --git a/emacs/gds.el b/emacs/gds.el index 50d08ec76..d5f607a32 100644 --- a/emacs/gds.el +++ b/emacs/gds.el @@ -478,11 +478,7 @@ The function is called with one argument, the CLIENT in question." ;; If there's already a window showing the buffer, use it. (let ((window (get-buffer-window buf t))) (if window - (progn - (make-frame-visible (window-frame window)) - (select-frame (window-frame window)) - (select-window window)) - ;;(select-window (display-buffer buf)) + (make-frame-visible (window-frame window)) (display-buffer buf))) ;; If there is an associated source buffer, display it as well. (if (and (eq (car gds-views) 'stack) |