.emacs-my
changeset 444 5f1cfffd6b67
parent 443 8c5d0e026821
child 445 17ffd2e22d12
--- a/.emacs-my	Fri Aug 27 12:24:21 2010 +0300
+++ b/.emacs-my	Sun Aug 29 13:48:17 2010 +0300
@@ -279,18 +279,20 @@
 ;; ----------------------------------------------------------------------
 ;; grep, find.
 
-;; Assume that we have GNU grep, so -H available.
-(setq grep-command "grep -nH ")
-;; Assume that we have GNU grep, so -H available.
-(setq grep-template "grep <C> -nH <R> <F>")
-(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 ")
-;; This pattern oriented to POSIX like sh shell and availability of GNU grep for -H option.
-(setq grep-find-template "find . <X> -type f <F> -exec grep <C> -nH <R> {} \\;")
+;; This settings have effect from Emacs 22.x.
+(when (eq system-type 'windows-nt)
+  ;; Workaround for Cygwin shell, when set 'CYGWIN=noglob'. By default 'shell-quote-argument'
+  ;; quoted by double '\' chars this cause failure.
+  (defun shell-quote-argument (argument)
+    (concat "'" argument "'")
+    )
+  ;; Workaround for Cygwin.
+  (setq null-device "/dev/null")
+  )
+
 ;; Do not set t because some grep do not has --color options.
 (setq grep-highlight-matches nil)
 (setq grep-use-null-device nil)
-;; For find-dired.
-;; (setq find-ls-option '("-exec ls -ld {} \\;" . "-ld"))
 
 (global-set-key [M-f7] 'rgrep)