]> git.eshelyaron.com Git - emacs.git/commitdiff
(grep-mode-tool-bar-map): New variable.
authorJan Djärv <jan.h.d@swipnet.se>
Mon, 25 Feb 2008 10:52:57 +0000 (10:52 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Mon, 25 Feb 2008 10:52:57 +0000 (10:52 +0000)
(grep-mode): Use grep-mode-tool-bar-map.

lisp/ChangeLog
lisp/progmodes/grep.el

index 31dc2347f979d217a6f035282b3e125730949f99..ffe621cfcbccbe6e505068cbb556316f53cc9299 100644 (file)
@@ -1,3 +1,14 @@
+2008-02-25  Jan Dj\e$(Q)Z\e(Brv  <jan.h.d@swipnet.se>
+
+       * progmodes/grep.el (grep-mode-tool-bar-map): New variable.
+       (grep-mode): Use grep-mode-tool-bar-map.
+
+       * progmodes/compile.el (tool-bar): Require tool-bar.
+       (compilation-mode-tool-bar-map): New variable.
+       (compilation-mode): Use compilation-mode-tool-bar-map.
+
+       * term/x-win.el (x-gtk-stock-map): Add cancel.  Remove extensions.
+
 2008-02-25  Glenn Morris  <rgm@gnu.org>
 
        * vc-sccs.el (vc-sccs-diff): Fix setting of oldvers and newvers.
index 0c7cb358f4a8135a3a99a2d0a2eac34a3f1b26fd..ef147aa79e0867d9256bb03e5b900d96e1c360bf 100644 (file)
@@ -220,6 +220,26 @@ See `compilation-error-screen-columns'"
   "Keymap for grep buffers.
 `compilation-minor-mode-map' is a cdr of this.")
 
+(defvar grep-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 match")
+       (tool-bar-local-item 
+        "left-arrow" 'previous-error-no-select 'previous-error-no-select map
+        :rtl "right-arrow"
+        :help "Goto previous match")
+       (tool-bar-local-item 
+        "cancel" 'kill-compilation 'kill-compilation map
+        :help "Stop grep")
+       (tool-bar-local-item 
+        "refresh" 'recompile 'recompile map
+        :help "Restart grep")
+       (append map help))))
+
 (defalias 'kill-grep 'kill-compilation)
 
 ;;;; TODO --- refine this!!
@@ -586,6 +606,7 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
 (define-compilation-mode grep-mode "Grep"
   "Sets `grep-last-buffer' and `compilation-window-height'."
   (setq grep-last-buffer (current-buffer))
+  (set (make-local-variable 'tool-bar-map) grep-mode-tool-bar-map)
   (set (make-local-variable 'compilation-error-face)
        grep-hit-face)
   (set (make-local-variable 'compilation-error-regexp-alist)