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

* 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.
This commit is contained in:
Neil Jerram 2007-02-06 23:31:03 +00:00
parent 2656b1b208
commit ed1dec3ce3
2 changed files with 39 additions and 33 deletions

View file

@ -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> 2007-01-17 Neil Jerram <neil@ossau.uklinux.net>
* gds-scheme.el (gds-display-results): Add another binding for * gds-scheme.el (gds-display-results): Add another binding for

View file

@ -382,39 +382,39 @@ region's code."
'(nil . "*Guile Evaluation*")))) '(nil . "*Guile Evaluation*"))))
(helpp (car helpp+bufname))) (helpp (car helpp+bufname)))
(let ((buf (get-buffer-create (cdr helpp+bufname)))) (let ((buf (get-buffer-create (cdr helpp+bufname))))
(save-excursion (save-selected-window
(set-buffer buf) (save-excursion
(gds-dissociate-buffer) (set-buffer buf)
(erase-buffer) (gds-dissociate-buffer)
(scheme-mode) (erase-buffer)
(insert (cdr correlator) "\n\n") (scheme-mode)
(while results (insert (cdr correlator) "\n\n")
(insert (car results)) (while results
(or (bolp) (insert "\\\n")) (insert (car results))
(if helpp (or (bolp) (insert "\\\n"))
nil (if helpp
(if (cadr results) nil
(mapcar (function (lambda (value) (if (cadr results)
(insert " => " value "\n"))) (mapcar (function (lambda (value)
(cadr results)) (insert " => " value "\n")))
(insert " => no (or unspecified) value\n")) (cadr results))
(insert "\n")) (insert " => no (or unspecified) value\n"))
(setq results (cddr results))) (insert "\n"))
(if stack-available (setq results (cddr results)))
(let ((beg (point)) (if stack-available
(map (make-sparse-keymap))) (let ((beg (point))
(define-key map [mouse-1] 'gds-show-last-stack) (map (make-sparse-keymap)))
(define-key map "\C-m" 'gds-show-last-stack) (define-key map [mouse-1] 'gds-show-last-stack)
(insert "[click here to show error stack]") (define-key map "\C-m" 'gds-show-last-stack)
(add-text-properties beg (point) (insert "[click here to show error stack]")
(list 'keymap map (add-text-properties beg (point)
'mouse-face 'highlight)) (list 'keymap map
(insert "\n"))) 'mouse-face 'highlight))
(goto-char (point-min)) (insert "\n")))
(gds-associate-buffer client)) (goto-char (point-min))
(pop-to-buffer buf) (gds-associate-buffer client))
(run-hooks 'temp-buffer-show-hook) (pop-to-buffer buf)
(other-window 1)))) (run-hooks 'temp-buffer-show-hook)))))
(defun gds-show-last-stack () (defun gds-show-last-stack ()
"Show stack of the most recent error." "Show stack of the most recent error."