summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorSam Steingold <sds@gnu.org>2008-05-08 17:28:05 +0000
committerSam Steingold <sds@gnu.org>2008-05-08 17:28:05 +0000
commit86c7460fae7cc08cd27376f7b1152578399e3bdf (patch)
treeefc81dbb4a1aea51fdeee4fb16fe9e9a6ef4eb92 /lisp/progmodes
parent9c355de85a4a109823fe040986ff3fc662e8b8fb (diff)
downloademacs-86c7460fae7cc08cd27376f7b1152578399e3bdf.tar.gz
(compilation-minor-mode-map, compilation-mode-map):
Bind "g" to recompile and "q" to quit-window. (grep-mode-map): Use `set-keymap-parent' to connect it to `compilation-minor-mode-map' (instead of an explicit `cons').
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/compile.el4
-rw-r--r--lisp/progmodes/grep.el4
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 90da308d431..e8f879f2ffa 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1357,6 +1357,8 @@ Returns the compilation buffer created."
(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 "g" 'recompile) ; revert
+ (define-key map "q" 'quit-window)
;; Set up the menu-bar
(define-key map [menu-bar compilation]
(cons "Errors" compilation-menu-map))
@@ -1401,6 +1403,8 @@ Returns the compilation buffer created."
(define-key map "\M-}" 'compilation-next-file)
(define-key map "\t" 'compilation-next-error)
(define-key map [backtab] 'compilation-previous-error)
+ (define-key map "g" 'recompile) ; revert
+ (define-key map "q" 'quit-window)
(define-key map " " 'scroll-up)
(define-key map "\^?" 'scroll-down)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index f7fabfc95e5..b76ed012c0f 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -177,7 +177,8 @@ See `compilation-error-screen-columns'"
:group 'grep)
(defvar grep-mode-map
- (let ((map (cons 'keymap compilation-minor-mode-map)))
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map compilation-minor-mode-map)
(define-key map " " 'scroll-up)
(define-key map "\^?" 'scroll-down)
(define-key map "\C-c\C-f" 'next-error-follow-minor-mode)
@@ -185,7 +186,6 @@ See `compilation-error-screen-columns'"
(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 "g" 'recompile) ; revert
(define-key map "{" 'compilation-previous-file)
(define-key map "}" 'compilation-next-file)
(define-key map "\t" 'compilation-next-error)