aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-10-11 19:58:49 +0000
committerChong Yidong2008-10-11 19:58:49 +0000
commitecad93d232af54ceee5255fb8f7cea935a400e75 (patch)
tree2688187bafbdb22f3a4aaee01fac64a1da72b85d
parentf4c77d44577df0d20990d5d3bfcb95aa2571b983 (diff)
downloademacs-ecad93d232af54ceee5255fb8f7cea935a400e75.tar.gz
emacs-ecad93d232af54ceee5255fb8f7cea935a400e75.zip
(grep-mode-tool-bar-map): Initialize it unconditionally.
-rw-r--r--lisp/progmodes/grep.el39
1 files changed, 19 insertions, 20 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 3d9a7db57af..945c656e7d3 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -228,26 +228,25 @@ See `compilation-error-screen-columns'"
228`compilation-minor-mode-map' is a cdr of this.") 228`compilation-minor-mode-map' is a cdr of this.")
229 229
230(defvar grep-mode-tool-bar-map 230(defvar grep-mode-tool-bar-map
231 (if (display-graphic-p) 231 (let ((map (butlast (copy-keymap tool-bar-map)))
232 (let ((map (butlast (copy-keymap tool-bar-map))) 232 (help (last tool-bar-map))) ;; Keep Help last in tool bar
233 (help (last tool-bar-map))) ;; Keep Help last in tool bar 233 (tool-bar-local-item
234 (tool-bar-local-item 234 "left-arrow" 'previous-error-no-select 'previous-error-no-select map
235 "left-arrow" 'previous-error-no-select 'previous-error-no-select map 235 :rtl "right-arrow"
236 :rtl "right-arrow" 236 :help "Goto previous match")
237 :help "Goto previous match") 237 (tool-bar-local-item
238 (tool-bar-local-item 238 "right-arrow" 'next-error-no-select 'next-error-no-select map
239 "right-arrow" 'next-error-no-select 'next-error-no-select map 239 :rtl "left-arrow"
240 :rtl "left-arrow" 240 :help "Goto next match")
241 :help "Goto next match") 241 (tool-bar-local-item
242 (tool-bar-local-item 242 "cancel" 'kill-compilation 'kill-compilation map
243 "cancel" 'kill-compilation 'kill-compilation map 243 :enable '(let ((buffer (compilation-find-buffer)))
244 :enable '(let ((buffer (compilation-find-buffer))) 244 (get-buffer-process buffer))
245 (get-buffer-process buffer)) 245 :help "Stop grep")
246 :help "Stop grep") 246 (tool-bar-local-item
247 (tool-bar-local-item 247 "refresh" 'recompile 'recompile map
248 "refresh" 'recompile 'recompile map 248 :help "Restart grep")
249 :help "Restart grep") 249 (append map help)))
250 (append map help))))
251 250
252(defalias 'kill-grep 'kill-compilation) 251(defalias 'kill-grep 'kill-compilation)
253 252