diff lisp/progmodes/grep.el @ 94566:c31e26fe0b1f

* progmodes/compile.el (compilation-start): Move setting of compilation-directory after (funcall mode) as that resets local variables, this fixes recompile in grep buffers. * grep.el (grep-mode-map): Bind "g" to recompile (like in dired &c).
author Sam Steingold <sds@gnu.org>
date Fri, 02 May 2008 18:37:07 +0000
parents e93898d6903e
children 52b7a8c22af5
line wrap: on
line diff
--- a/lisp/progmodes/grep.el	Fri May 02 18:32:18 2008 +0000
+++ b/lisp/progmodes/grep.el	Fri May 02 18:37:07 2008 +0000
@@ -187,6 +187,7 @@
     (define-key map "\r" 'compile-goto-error)  ;; ?
     (define-key map "n" 'next-error-no-select)
     (define-key map "p" 'previous-error-no-select)
+    (define-key map "g" 'recompile) ; revert
     (define-key map "{" 'compilation-previous-file)
     (define-key map "}" 'compilation-next-file)
     (define-key map "\t" 'compilation-next-error)
@@ -230,7 +231,7 @@
   (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 
+	(tool-bar-local-item
 	 "left-arrow" 'previous-error-no-select 'previous-error-no-select map
 	 :rtl "right-arrow"
 	 :help "Goto previous match")
@@ -238,12 +239,12 @@
 	 "right-arrow" 'next-error-no-select 'next-error-no-select map
 	 :rtl "left-arrow"
 	 :help "Goto next match")
-	(tool-bar-local-item 
+	(tool-bar-local-item
 	 "cancel" 'kill-compilation 'kill-compilation map
 	 :enable '(let ((buffer (compilation-find-buffer)))
 		    (get-buffer-process buffer))
 	 :help "Stop grep")
-	(tool-bar-local-item 
+	(tool-bar-local-item
 	 "refresh" 'recompile 'recompile map
 	 :help "Restart grep")
 	(append map help))))