277 (setq search-highlight t) ; highlight incremental search |
277 (setq search-highlight t) ; highlight incremental search |
278 |
278 |
279 ;; ---------------------------------------------------------------------- |
279 ;; ---------------------------------------------------------------------- |
280 ;; grep, find. |
280 ;; grep, find. |
281 |
281 |
282 ;; Assume that we have GNU grep, so -H available. |
282 ;; This settings have effect from Emacs 22.x. |
283 (setq grep-command "grep -nH ") |
283 (when (eq system-type 'windows-nt) |
284 ;; Assume that we have GNU grep, so -H available. |
284 ;; Workaround for Cygwin shell, when set 'CYGWIN=noglob'. By default 'shell-quote-argument' |
285 (setq grep-template "grep <C> -nH <R> <F>") |
285 ;; quoted by double '\' chars this cause failure. |
286 (setq grep-find-command "find . '(' -name .svn -o -name CVS -o -name .hg -o -name _darcs -o -name .git ')' -prune -o -type f -name '*' -print0 | xargs -0 -e grep -nH ") |
286 (defun shell-quote-argument (argument) |
287 ;; This pattern oriented to POSIX like sh shell and availability of GNU grep for -H option. |
287 (concat "'" argument "'") |
288 (setq grep-find-template "find . <X> -type f <F> -exec grep <C> -nH <R> {} \\;") |
288 ) |
|
289 ;; Workaround for Cygwin. |
|
290 (setq null-device "/dev/null") |
|
291 ) |
|
292 |
289 ;; Do not set t because some grep do not has --color options. |
293 ;; Do not set t because some grep do not has --color options. |
290 (setq grep-highlight-matches nil) |
294 (setq grep-highlight-matches nil) |
291 (setq grep-use-null-device nil) |
295 (setq grep-use-null-device nil) |
292 ;; For find-dired. |
|
293 ;; (setq find-ls-option '("-exec ls -ld {} \\;" . "-ld")) |
|
294 |
296 |
295 (global-set-key [M-f7] 'rgrep) |
297 (global-set-key [M-f7] 'rgrep) |
296 |
298 |
297 ;; ---------------------------------------------------------------------- |
299 ;; ---------------------------------------------------------------------- |
298 ;; syntax highlighting. |
300 ;; syntax highlighting. |