changeset 58491:2a47737d91b0

(compilation-mode-map): Don't inherit from compilation-minor-mode-map; copy its bindings instead. But the menu bar Compile entry now does inherit from compilation-menu-map.
author Richard M. Stallman <rms@gnu.org>
date Thu, 25 Nov 2004 03:01:10 +0000
parents 2176686c8a19
children 4edc8e8a8ed6
files lisp/progmodes/compile.el
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Thu Nov 25 02:58:34 2004 +0000
+++ b/lisp/progmodes/compile.el	Thu Nov 25 03:01:10 2004 +0000
@@ -1080,14 +1080,24 @@
 
 (defvar compilation-mode-map
   (let ((map (make-sparse-keymap)))
-    (set-keymap-parent map compilation-minor-mode-map)
+    (define-key map [mouse-2] 'compile-goto-error)
+    (define-key map "\C-c\C-c" 'compile-goto-error)
+    (define-key map "\C-m" 'compile-goto-error)
+    (define-key map "\C-c\C-k" 'kill-compilation)
+    (define-key map "\M-n" 'compilation-next-error)
+    (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 " " 'scroll-up)
     (define-key map "\^?" 'scroll-down)
     (define-key map "\C-c\C-f" 'next-error-follow-minor-mode)
 
     ;; Set up the menu-bar
-    (define-key map [menu-bar compilation]
-      (cons "Compile" (make-sparse-keymap "Compile")))
+    (let ((submap (make-sparse-keymap "Compile")))
+      (define-key map [menu-bar compilation]
+	(cons "Compile" submap))
+      (set-keymap-parent submap compilation-menu-map))
     (define-key map [menu-bar compilation compilation-separator2]
       '("----" . nil))
     (define-key map [menu-bar compilation compilation-grep]