emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/compile.el,v


From: Jan Djärv
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/compile.el,v
Date: Mon, 25 Feb 2008 10:52:09 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Jan Djärv <jhd>        08/02/25 10:52:09

Index: compile.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/compile.el,v
retrieving revision 1.458
retrieving revision 1.459
diff -u -b -r1.458 -r1.459
--- compile.el  24 Feb 2008 23:21:39 -0000      1.458
+++ compile.el  25 Feb 2008 10:52:09 -0000      1.459
@@ -73,6 +73,7 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl))
+(require 'tool-bar)
 
 (defvar font-lock-extra-managed-props)
 (defvar font-lock-keywords)
@@ -1377,6 +1378,26 @@
   "Keymap for compilation log buffers.
 `compilation-minor-mode-map' is a parent of this.")
 
+(defvar compilation-mode-tool-bar-map
+  (if (display-graphic-p)
+      (let ((map (butlast (copy-keymap tool-bar-map)))
+           (help (last tool-bar-map))) ;; Keep Help last in tool bar
+       (tool-bar-local-item
+        "right-arrow" 'next-error-no-select 'next-error-no-select map
+        :rtl "left-arrow"
+        :help "Goto next error")
+       (tool-bar-local-item 
+        "left-arrow" 'previous-error-no-select 'previous-error-no-select map
+        :rtl "right-arrow"
+        :help "Goto previous error")
+       (tool-bar-local-item 
+        "cancel" 'kill-compilation 'kill-compilation map
+        :help "Stop compilation")
+       (tool-bar-local-item 
+        "refresh" 'recompile 'recompile map
+        :help "Restart compilation")
+       (append map help))))
+
 (put 'compilation-mode 'mode-class 'special)
 
 ;;;###autoload
@@ -1392,6 +1413,7 @@
   (interactive)
   (kill-all-local-variables)
   (use-local-map compilation-mode-map)
+  (set (make-local-variable 'tool-bar-map) compilation-mode-tool-bar-map)
   (setq major-mode 'compilation-mode
        mode-name (or name-of-mode "Compilation"))
   (set (make-local-variable 'page-delimiter)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]