From 86c7460fae7cc08cd27376f7b1152578399e3bdf Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Thu, 8 May 2008 17:28:05 +0000 Subject: [PATCH] (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'). --- lisp/ChangeLog | 8 ++++++++ lisp/progmodes/compile.el | 4 ++++ lisp/progmodes/grep.el | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ca536eaec58..9c536a464fb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2008-05-08 Sam Steingold + + * 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 * org/org.el (org-modules, org-format-latex-options): 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) -- 2.39.2