comparison lisp/progmodes/compile.el @ 39358:d599e4f7047f

w32 find cannot be used with `grep-find'.
author Sam Steingold <sds@gnu.org>
date Wed, 19 Sep 2001 20:59:24 +0000
parents 75fdf7bea836
children 56800ba6a856
comparison
equal deleted inserted replaced
39357:9012f11877c1 39358:d599e4f7047f
433 ;; (error nil)) 433 ;; (error nil))
434 ;; 1) 434 ;; 1)
435 ;; "zgrep" 435 ;; "zgrep"
436 ;; "grep") 436 ;; "grep")
437 "The default grep program for `grep-command' and `grep-find-command'. 437 "The default grep program for `grep-command' and `grep-find-command'.
438 This variable's value takes effect when `grep-compute-defaults' is called.")
439
440 (defvar find-program "find"
441 "The default find program for `grep-find-command'.
438 This variable's value takes effect when `grep-compute-defaults' is called.") 442 This variable's value takes effect when `grep-compute-defaults' is called.")
439 443
440 (defvar grep-find-use-xargs nil 444 (defvar grep-find-use-xargs nil
441 "Whether \\[grep-find] uses the `xargs' utility by default. 445 "Whether \\[grep-find] uses the `xargs' utility by default.
442 446
590 0)) 594 0))
591 'gnu))) 595 'gnu)))
592 (unless grep-find-command 596 (unless grep-find-command
593 (setq grep-find-command 597 (setq grep-find-command
594 (cond ((eq grep-find-use-xargs 'gnu) 598 (cond ((eq grep-find-use-xargs 'gnu)
595 (format "find . -type f -print0 | xargs -0 -e %s" 599 (format "%s . -type f -print0 | xargs -0 -e %s"
596 grep-command)) 600 find-program grep-command))
597 (grep-find-use-xargs 601 (grep-find-use-xargs
598 (format "find . -type f -print | xargs %s" grep-command)) 602 (format "%s . -type f -print | xargs %s"
599 (t (cons (format "find . -type f -exec %s {} %s \\;" 603 find-program grep-command))
600 grep-command null-device) 604 (t (cons (format "%s . -type f -exec %s {} %s \\;"
605 find-program grep-command null-device)
601 (+ 22 (length grep-command)))))))) 606 (+ 22 (length grep-command))))))))
602 607
603 ;;;###autoload 608 ;;;###autoload
604 (defun grep (command-args) 609 (defun grep (command-args)
605 "Run grep, with user-specified args, and collect output in a buffer. 610 "Run grep, with user-specified args, and collect output in a buffer.