summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2007-02-06 23:31:03 +0000
committerNeil Jerram <neil@ossau.uklinux.net>2007-02-06 23:31:03 +0000
commited1dec3ce3f00af862efe7a962e6611495fe5baf (patch)
treecb6cb3da6ac13a3b16ae1ee2528d9a1a55ef7e3e /emacs
parent2656b1b208ab8f2ab96b4e27edb7a9096acc2060 (diff)
* gds-scheme.el (gds-display-results): Use save-selected-window
instead of switching to other-window in order to return to the proper window in frames with more than two windows.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/ChangeLog6
-rwxr-xr-xemacs/gds-scheme.el66
2 files changed, 39 insertions, 33 deletions
diff --git a/emacs/ChangeLog b/emacs/ChangeLog
index fabe42310..5a4365ff5 100644
--- a/emacs/ChangeLog
+++ b/emacs/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-06 Clinton Ebadi <clinton@unknownlamer.org>
+
+ * gds-scheme.el (gds-display-results): Use save-selected-window
+ instead of switching to other-window in order to return to the
+ proper window in frames with more than two windows.
+
2007-01-17 Neil Jerram <neil@ossau.uklinux.net>
* gds-scheme.el (gds-display-results): Add another binding for
diff --git a/emacs/gds-scheme.el b/emacs/gds-scheme.el
index 29a54a574..a03a07ba5 100755
--- a/emacs/gds-scheme.el
+++ b/emacs/gds-scheme.el
@@ -382,39 +382,39 @@ region's code."
'(nil . "*Guile Evaluation*"))))
(helpp (car helpp+bufname)))
(let ((buf (get-buffer-create (cdr helpp+bufname))))
- (save-excursion
- (set-buffer buf)
- (gds-dissociate-buffer)
- (erase-buffer)
- (scheme-mode)
- (insert (cdr correlator) "\n\n")
- (while results
- (insert (car results))
- (or (bolp) (insert "\\\n"))
- (if helpp
- nil
- (if (cadr results)
- (mapcar (function (lambda (value)
- (insert " => " value "\n")))
- (cadr results))
- (insert " => no (or unspecified) value\n"))
- (insert "\n"))
- (setq results (cddr results)))
- (if stack-available
- (let ((beg (point))
- (map (make-sparse-keymap)))
- (define-key map [mouse-1] 'gds-show-last-stack)
- (define-key map "\C-m" 'gds-show-last-stack)
- (insert "[click here to show error stack]")
- (add-text-properties beg (point)
- (list 'keymap map
- 'mouse-face 'highlight))
- (insert "\n")))
- (goto-char (point-min))
- (gds-associate-buffer client))
- (pop-to-buffer buf)
- (run-hooks 'temp-buffer-show-hook)
- (other-window 1))))
+ (save-selected-window
+ (save-excursion
+ (set-buffer buf)
+ (gds-dissociate-buffer)
+ (erase-buffer)
+ (scheme-mode)
+ (insert (cdr correlator) "\n\n")
+ (while results
+ (insert (car results))
+ (or (bolp) (insert "\\\n"))
+ (if helpp
+ nil
+ (if (cadr results)
+ (mapcar (function (lambda (value)
+ (insert " => " value "\n")))
+ (cadr results))
+ (insert " => no (or unspecified) value\n"))
+ (insert "\n"))
+ (setq results (cddr results)))
+ (if stack-available
+ (let ((beg (point))
+ (map (make-sparse-keymap)))
+ (define-key map [mouse-1] 'gds-show-last-stack)
+ (define-key map "\C-m" 'gds-show-last-stack)
+ (insert "[click here to show error stack]")
+ (add-text-properties beg (point)
+ (list 'keymap map
+ 'mouse-face 'highlight))
+ (insert "\n")))
+ (goto-char (point-min))
+ (gds-associate-buffer client))
+ (pop-to-buffer buf)
+ (run-hooks 'temp-buffer-show-hook)))))
(defun gds-show-last-stack ()
"Show stack of the most recent error."