aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/compile.el41
1 files changed, 22 insertions, 19 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f6e15d0ba4e..2405efb2ba3 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1471,25 +1471,28 @@ Returns the compilation buffer created."
1471`compilation-minor-mode-map' is a parent of this.") 1471`compilation-minor-mode-map' is a parent of this.")
1472 1472
1473(defvar compilation-mode-tool-bar-map 1473(defvar compilation-mode-tool-bar-map
1474 (let ((map (butlast (copy-keymap tool-bar-map))) 1474 ;; When bootstrapping, tool-bar-map is not properly initialized yet,
1475 (help (last tool-bar-map))) ;; Keep Help last in tool bar 1475 ;; so don't do anything.
1476 (tool-bar-local-item 1476 (when (keymapp (butlast tool-bar-map))
1477 "left-arrow" 'previous-error-no-select 'previous-error-no-select map 1477 (let ((map (butlast (copy-keymap tool-bar-map)))
1478 :rtl "right-arrow" 1478 (help (last tool-bar-map))) ;; Keep Help last in tool bar
1479 :help "Goto previous error") 1479 (tool-bar-local-item
1480 (tool-bar-local-item 1480 "left-arrow" 'previous-error-no-select 'previous-error-no-select map
1481 "right-arrow" 'next-error-no-select 'next-error-no-select map 1481 :rtl "right-arrow"
1482 :rtl "left-arrow" 1482 :help "Goto previous error")
1483 :help "Goto next error") 1483 (tool-bar-local-item
1484 (tool-bar-local-item 1484 "right-arrow" 'next-error-no-select 'next-error-no-select map
1485 "cancel" 'kill-compilation 'kill-compilation map 1485 :rtl "left-arrow"
1486 :enable '(let ((buffer (compilation-find-buffer))) 1486 :help "Goto next error")
1487 (get-buffer-process buffer)) 1487 (tool-bar-local-item
1488 :help "Stop compilation") 1488 "cancel" 'kill-compilation 'kill-compilation map
1489 (tool-bar-local-item 1489 :enable '(let ((buffer (compilation-find-buffer)))
1490 "refresh" 'recompile 'recompile map 1490 (get-buffer-process buffer))
1491 :help "Restart compilation") 1491 :help "Stop compilation")
1492 (append map help))) 1492 (tool-bar-local-item
1493 "refresh" 'recompile 'recompile map
1494 :help "Restart compilation")
1495 (append map help))))
1493 1496
1494(put 'compilation-mode 'mode-class 'special) 1497(put 'compilation-mode 'mode-class 'special)
1495 1498