# HG changeset patch # User Stefan Monnier # Date 1081966325 0 # Node ID 21c1ccea95335c80db40c5d6e8387aa43cfb24e7 # Parent abef03b05f030b8691ed931e7667c6bd5a8af6dc (compilation-button-map): New keymap. (compilation-error-properties): Use it. (compilation-shell-minor-mode-map): Don't bind mouse-2. diff -r abef03b05f03 -r 21c1ccea9533 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Wed Apr 14 17:49:43 2004 +0000 +++ b/lisp/progmodes/compile.el Wed Apr 14 18:12:05 2004 +0000 @@ -646,6 +646,7 @@ (if line "mouse-2: visit this file and line" "mouse-2: visit this file")) + keymap compilation-button-map mouse-face highlight)))) (defun compilation-mode-font-lock-keywords () @@ -998,7 +999,6 @@ (defvar compilation-shell-minor-mode-map (let ((map (make-sparse-keymap))) - (define-key map [mouse-2] 'compile-goto-error) (define-key map "\M-\C-m" 'compile-goto-error) (define-key map "\M-\C-n" 'compilation-next-error) (define-key map "\M-\C-p" 'compilation-previous-error) @@ -1010,6 +1010,14 @@ map) "Keymap for `compilation-shell-minor-mode'.") +(defvar compilation-button-map + (let ((map (make-sparse-keymap))) + (define-key map [mouse-2] 'compile-goto-error) + (define-key map "\C-m" 'compile-goto-error) + map) + "Keymap for compilation-message buttons.") +(fset 'compilation-button-map compilation-button-map) + (defvar compilation-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map compilation-minor-mode-map)