changeset 94775:b51bb57e843b

(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').
author Sam Steingold <sds@gnu.org>
date Thu, 08 May 2008 17:28:05 +0000
parents 7493a5cb8955
children a1388442d1f5
files lisp/ChangeLog lisp/progmodes/compile.el lisp/progmodes/grep.el
diffstat 3 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu May 08 15:59:16 2008 +0000
+++ b/lisp/ChangeLog	Thu May 08 17:28:05 2008 +0000
@@ -1,3 +1,11 @@
+2008-05-08  Sam Steingold  <sds@gnu.org>
+
+	* progmodes/compile.el (compilation-minor-mode-map)
+	(compilation-mode-map):  Bind "g" to recompile and "q" to
+	quit-window.
+	* grep.el (grep-mode-map): Use `set-keymap-parent' to connect it
+	to `compilation-minor-mode-map' (instead of an explicit `cons').
+
 2008-05-08  Juanma Barranquero  <lekktu@gmail.com>
 
 	* org/org.el (org-modules, org-format-latex-options):
--- a/lisp/progmodes/compile.el	Thu May 08 15:59:16 2008 +0000
+++ b/lisp/progmodes/compile.el	Thu May 08 17:28:05 2008 +0000
@@ -1357,6 +1357,8 @@
     (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 @@
     (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)
--- a/lisp/progmodes/grep.el	Thu May 08 15:59:16 2008 +0000
+++ b/lisp/progmodes/grep.el	Thu May 08 17:28:05 2008 +0000
@@ -177,7 +177,8 @@
   :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 @@
     (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)