diff options
| author | Kenichi Handa | 2011-01-12 15:11:40 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2011-01-12 15:11:40 +0900 |
| commit | 07ee9351461ff93feabd66f36ccfdc0ff7b5dcfc (patch) | |
| tree | c5c619a64600c6d76b3c3134037baeabf73d191b /lisp/progmodes | |
| parent | e7ca0062a4899a2cc5f8b0793eb0bca58efea855 (diff) | |
| parent | ae01d7ca64c60e98e2a37231c4b33271c5f78f31 (diff) | |
| download | emacs-07ee9351461ff93feabd66f36ccfdc0ff7b5dcfc.tar.gz emacs-07ee9351461ff93feabd66f36ccfdc0ff7b5dcfc.zip | |
merge emacs-23
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/grep.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index dac14d07ef8..dd6dc025d5b 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -561,7 +561,10 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 561 | (unless grep-find-command | 561 | (unless grep-find-command |
| 562 | (setq grep-find-command | 562 | (setq grep-find-command |
| 563 | (cond ((eq grep-find-use-xargs 'gnu) | 563 | (cond ((eq grep-find-use-xargs 'gnu) |
| 564 | (format "%s . -type f -print0 | %s -0 -e %s" | 564 | ;; Windows shells need the program file name |
| 565 | ;; after the pipe symbol be quoted if they use | ||
| 566 | ;; forward slashes as directory separators. | ||
| 567 | (format "%s . -type f -print0 | \"%s\" -0 -e %s" | ||
| 565 | find-program xargs-program grep-command)) | 568 | find-program xargs-program grep-command)) |
| 566 | ((eq grep-find-use-xargs 'exec) | 569 | ((eq grep-find-use-xargs 'exec) |
| 567 | (let ((cmd0 (format "%s . -type f -exec %s" | 570 | (let ((cmd0 (format "%s . -type f -exec %s" |
| @@ -572,21 +575,21 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 572 | (shell-quote-argument ";")) | 575 | (shell-quote-argument ";")) |
| 573 | (1+ (length cmd0))))) | 576 | (1+ (length cmd0))))) |
| 574 | (t | 577 | (t |
| 575 | (format "%s . -type f -print | %s %s" | 578 | (format "%s . -type f -print | \"%s\" %s" |
| 576 | find-program xargs-program grep-command))))) | 579 | find-program xargs-program grep-command))))) |
| 577 | (unless grep-find-template | 580 | (unless grep-find-template |
| 578 | (setq grep-find-template | 581 | (setq grep-find-template |
| 579 | (let ((gcmd (format "%s <C> %s <R>" | 582 | (let ((gcmd (format "%s <C> %s <R>" |
| 580 | grep-program grep-options))) | 583 | grep-program grep-options))) |
| 581 | (cond ((eq grep-find-use-xargs 'gnu) | 584 | (cond ((eq grep-find-use-xargs 'gnu) |
| 582 | (format "%s . <X> -type f <F> -print0 | %s -0 -e %s" | 585 | (format "%s . <X> -type f <F> -print0 | \"%s\" -0 -e %s" |
| 583 | find-program xargs-program gcmd)) | 586 | find-program xargs-program gcmd)) |
| 584 | ((eq grep-find-use-xargs 'exec) | 587 | ((eq grep-find-use-xargs 'exec) |
| 585 | (format "%s . <X> -type f <F> -exec %s {} %s %s" | 588 | (format "%s . <X> -type f <F> -exec %s {} %s %s" |
| 586 | find-program gcmd null-device | 589 | find-program gcmd null-device |
| 587 | (shell-quote-argument ";"))) | 590 | (shell-quote-argument ";"))) |
| 588 | (t | 591 | (t |
| 589 | (format "%s . <X> -type f <F> -print | %s %s" | 592 | (format "%s . <X> -type f <F> -print | \"%s\" %s" |
| 590 | find-program xargs-program gcmd)))))))) | 593 | find-program xargs-program gcmd)))))))) |
| 591 | (when (eq grep-highlight-matches 'auto-detect) | 594 | (when (eq grep-highlight-matches 'auto-detect) |
| 592 | (setq grep-highlight-matches | 595 | (setq grep-highlight-matches |