From e8e655e21bc315a9522b66dd6de1dc76d928ccd5 Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Tue, 22 Sep 2009 00:00:59 +0100 Subject: [PATCH] GDS usability: operation without a mouse Derek Peschel provided this patch and described it as follows. "Most of the time I use Terminal in OS X, rather than xterm. I also don't bother with the GUI versions of Emacs. So unfortunately I have no mouse support in Emacs. Also the system I'm testing Guile on thinks my terminal doesn't support color and I haven't fixed it yet. The attached patch makes GDS more usable for me. "With no mouse, the "[click here to show error stack]" design is very inconvenient. You added a C-M (return) binding at some point. I copied that, but I also changed the message to show it. And I made the return work when the cursor is after the right bracket." * emacs/gds-scheme.el (gds-display-results): Make "click here" message more helpful for people without mice. Also extend text properties so that a RET key press works at the end of that line. --- THANKS | 1 + emacs/gds-scheme.el | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/THANKS b/THANKS index 90121094b..8deace5e9 100644 --- a/THANKS +++ b/THANKS @@ -85,6 +85,7 @@ For fixes or providing information which led to a fix: Peter O'Gorman Pieter Pareit Jack Pavlovsky + Derek Peschel Arno Peters Ron Peterson David Pirotte diff --git a/emacs/gds-scheme.el b/emacs/gds-scheme.el index bb605c364..326d15265 100755 --- a/emacs/gds-scheme.el +++ b/emacs/gds-scheme.el @@ -424,11 +424,13 @@ through the code." (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]") + (insert "[click here (or RET) to show error stack]") (add-text-properties beg (point) (list 'keymap map 'mouse-face 'highlight)) - (insert "\n"))) + (insert "\n") + (add-text-properties (1- (point)) (point) + (list 'keymap map)))) (goto-char (point-min)) (gds-associate-buffer client)) (pop-to-buffer buf)