# HG changeset patch # User Richard M. Stallman # Date 1075398876 0 # Node ID 4deb14fde58c257b211dade0283dfdfef159f73e # Parent fef39a2085e4791359e13b88813dd9667943fcbe (grep-compute-defaults): Use executable-command-find-posix-p. (grep-find): Check `grep-find-command'. diff -r fef39a2085e4 -r 4deb14fde58c lisp/progmodes/grep.el --- a/lisp/progmodes/grep.el Thu Jan 29 17:53:17 2004 +0000 +++ b/lisp/progmodes/grep.el Thu Jan 29 17:54:36 2004 +0000 @@ -318,7 +318,12 @@ 'gnu))) (unless grep-find-command (setq grep-find-command - (cond ((eq grep-find-use-xargs 'gnu) + (cond ((not (executable-command-find-unix-p "find")) + (message + (concat "compile.el: Unix type find(1) not found. " + "Please set `grep-find-command'.")) + nil) + ((eq grep-find-use-xargs 'gnu) (format "%s . -type f -print0 | xargs -0 -e %s" find-program grep-command)) (grep-find-use-xargs @@ -443,11 +448,17 @@ (progn (unless grep-find-command (grep-compute-defaults)) - (list (read-from-minibuffer "Run find (like this): " - grep-find-command nil nil - 'grep-find-history)))) - (let ((null-device nil)) ; see grep - (grep command-args))) + (if grep-find-command + (list (read-from-minibuffer "Run find (like this): " + grep-find-command nil nil + 'grep-find-history)) + ;; No default was set + (read-string + "compile.el: No `grep-find-command' command available. Press RET.") + (list nil)))) + (when (and grep-find-command command-args) + (let ((null-device nil)) ; see grep + (grep command-args)))) (defun grep-expand-command-macros (command &optional regexp files dir excl case-fold) "Patch grep COMMAND replacing , etc."