aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/compile.el19
1 files changed, 8 insertions, 11 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index d99cddadc3a..dfd1f0a3eea 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -982,7 +982,7 @@ exited abnormally with code %d\n"
982 982
983(defvar compilation-minor-mode-map 983(defvar compilation-minor-mode-map
984 (let ((map (make-sparse-keymap))) 984 (let ((map (make-sparse-keymap)))
985 (define-key map [mouse-2] 'compile-mouse-goto-error) 985 (define-key map [mouse-2] 'compile-goto-error)
986 (define-key map "\C-c\C-c" 'compile-goto-error) 986 (define-key map "\C-c\C-c" 'compile-goto-error)
987 (define-key map "\C-m" 'compile-goto-error) 987 (define-key map "\C-m" 'compile-goto-error)
988 (define-key map "\C-c\C-k" 'kill-compilation) 988 (define-key map "\C-c\C-k" 'kill-compilation)
@@ -998,7 +998,7 @@ exited abnormally with code %d\n"
998 998
999(defvar compilation-shell-minor-mode-map 999(defvar compilation-shell-minor-mode-map
1000 (let ((map (make-sparse-keymap))) 1000 (let ((map (make-sparse-keymap)))
1001 (define-key map [mouse-2] 'compile-mouse-goto-error) 1001 (define-key map [mouse-2] 'compile-goto-error)
1002 (define-key map "\M-\C-m" 'compile-goto-error) 1002 (define-key map "\M-\C-m" 'compile-goto-error)
1003 (define-key map "\M-\C-n" 'compilation-next-error) 1003 (define-key map "\M-\C-n" 'compilation-next-error)
1004 (define-key map "\M-\C-p" 'compilation-previous-error) 1004 (define-key map "\M-\C-p" 'compilation-previous-error)
@@ -1358,23 +1358,20 @@ Prefix arg N says how many files to move backwards (or forwards, if negative)."
1358 (interrupt-process (get-buffer-process buffer)) 1358 (interrupt-process (get-buffer-process buffer))
1359 (error "The compilation process is not running")))) 1359 (error "The compilation process is not running"))))
1360 1360
1361(defun compile-mouse-goto-error (event) 1361(defalias 'compile-mouse-goto-error 'compile-goto-error)
1362 "Visit the source for the error message the mouse is pointing at."
1363 (interactive "e")
1364 (mouse-set-point event)
1365 (compile-goto-error))
1366 1362
1367(defun compile-goto-error () 1363(defun compile-goto-error (&optional event)
1368 "Visit the source for the error message point is on. 1364 "Visit the source for the error message at point.
1369Use this command in a compilation log buffer. Sets the mark at point there." 1365Use this command in a compilation log buffer. Sets the mark at point there."
1370 (interactive) 1366 (interactive (list last-input-event))
1367 (mouse-set-point event)
1371 (or (compilation-buffer-p (current-buffer)) 1368 (or (compilation-buffer-p (current-buffer))
1372 (error "Not in a compilation buffer")) 1369 (error "Not in a compilation buffer"))
1373 (if (get-text-property (point) 'directory) 1370 (if (get-text-property (point) 'directory)
1374 (dired-other-window (car (get-text-property (point) 'directory))) 1371 (dired-other-window (car (get-text-property (point) 'directory)))
1375 (push-mark) 1372 (push-mark)
1376 (setq compilation-current-error (point)) 1373 (setq compilation-current-error (point))
1377 (next-error 0))) 1374 (next-error 0)))))
1378 1375
1379;; Return a compilation buffer. 1376;; Return a compilation buffer.
1380;; If the current buffer is a compilation buffer, return it. 1377;; If the current buffer is a compilation buffer, return it.