[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tab/S-Tab in compile buffers
From: |
Juri Linkov |
Subject: |
Re: Tab/S-Tab in compile buffers |
Date: |
Fri, 22 Jul 2005 21:22:55 +0300 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
> A compilation buffer has a lot of underlined links. I would expect
> Tab/S-Tab to move between those just as they do in Help or Info (and
> in web-browsers ;-).
>
> Should Tab/S-Tab behave the same way in a compilation buffer?
A few days ago I added the [backtab] key binding to the existing [tab]
key binding in grep.el for symmetry. I don't know why [tab] was
bound to `compilation-next-file' instead of `compilation-next-error'.
It is more natural to expect [tab] moving to the next underlined link
(which `compilation-next-error' does). So what about the following patch
(I also deleted commented-out bindings for next-line because this is now
implemented by `next-error-follow-minor-mode'):
Index: lisp/progmodes/compile.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/compile.el,v
retrieving revision 1.365
diff -c -r1.365 compile.el
*** lisp/progmodes/compile.el 9 Jul 2005 20:45:26 -0000 1.365
--- lisp/progmodes/compile.el 22 Jul 2005 18:19:55 -0000
***************
*** 1158,1163 ****
--- 1173,1180 ----
(define-key map "\M-p" 'compilation-previous-error)
(define-key map "\M-{" 'compilation-previous-file)
(define-key map "\M-}" 'compilation-next-file)
+ (define-key map "\t" 'compilation-next-error)
+ (define-key map [backtab] 'compilation-previous-error)
(define-key map " " 'scroll-up)
(define-key map "\^?" 'scroll-down)
Index: lisp/progmodes/grep.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/grep.el,v
retrieving revision 1.39
diff -c -r1.39 grep.el
*** lisp/progmodes/grep.el 19 Jul 2005 14:21:23 -0000 1.39
--- lisp/progmodes/grep.el 22 Jul 2005 18:19:57 -0000
***************
*** 187,203 ****
(define-key map "\^?" 'scroll-down)
(define-key map "\C-c\C-f" 'next-error-follow-minor-mode)
- ;; This is intolerable -- rms
- ;;; (define-key map [remap next-line] 'compilation-next-error)
- ;;; (define-key map [remap previous-line] 'compilation-previous-error)
-
(define-key map "\r" 'compile-goto-error) ;; ?
(define-key map "n" 'next-error-no-select)
(define-key map "p" 'previous-error-no-select)
(define-key map "{" 'compilation-previous-file)
(define-key map "}" 'compilation-next-file)
! (define-key map [backtab] 'compilation-previous-file)
! (define-key map "\t" 'compilation-next-file)
;; Set up the menu-bar
(define-key map [menu-bar grep]
--- 187,199 ----
(define-key map "\^?" 'scroll-down)
(define-key map "\C-c\C-f" 'next-error-follow-minor-mode)
(define-key map "\r" 'compile-goto-error) ;; ?
(define-key map "n" 'next-error-no-select)
(define-key map "p" 'previous-error-no-select)
(define-key map "{" 'compilation-previous-file)
(define-key map "}" 'compilation-next-file)
! (define-key map "\t" 'compilation-next-error)
! (define-key map [backtab] 'compilation-previous-error)
;; Set up the menu-bar
(define-key map [menu-bar grep]
--
Juri Linkov
http://www.jurta.org/emacs/