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/grep.el,v


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

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

Index: grep.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/grep.el,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -b -r1.85 -r1.86
--- grep.el     1 Feb 2008 01:38:31 -0000       1.85
+++ grep.el     25 Feb 2008 10:52:24 -0000      1.86
@@ -220,6 +220,26 @@
   "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 @@
 (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)




reply via email to

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