aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2004-01-29 17:55:39 +0000
committerRichard M. Stallman2004-01-29 17:55:39 +0000
commit40f8257f08b9825b9f86bbfb1f313cdeee3eab49 (patch)
treec1c9f7f2e70d383bb9952c1509a58c5d4bb5b7ea
parent87f54c051d8ecd413fa7423fd44b00d6b1dd355f (diff)
downloademacs-40f8257f08b9825b9f86bbfb1f313cdeee3eab49.tar.gz
emacs-40f8257f08b9825b9f86bbfb1f313cdeee3eab49.zip
(file-cache-find-posix-p): Deleted.
(file-cache-add-directory-using-find): Use `executable-command-find-posix-p'.
-rw-r--r--lisp/filecache.el17
1 files changed, 2 insertions, 15 deletions
diff --git a/lisp/filecache.el b/lisp/filecache.el
index d983472041b..ea8bdaaf232 100644
--- a/lisp/filecache.el
+++ b/lisp/filecache.el
@@ -332,27 +332,14 @@ in each directory, not to the directory list itself."
332 file-cache-alist))) 332 file-cache-alist)))
333 ))) 333 )))
334 334
335(defun file-cache-find-posix-p ()
336 "Check if `file-cache-find-command' handles wildcards POSIX style."
337 (or (not (memq system-type '(ms-dos windows-nt))) ;; Include all POSIX systems.
338 (with-temp-buffer ;; Cygwin?
339 (call-process file-cache-find-command
340 nil
341 (current-buffer)
342 nil
343 "--version")
344 (goto-char (point-min))
345 ;; Cygwin
346 (if (re-search-forward "GNU" nil t)
347 (buffer-string)))))
348
349(defun file-cache-add-directory-using-find (directory) 335(defun file-cache-add-directory-using-find (directory)
350 "Use the `find' command to add files to the file cache. 336 "Use the `find' command to add files to the file cache.
351Find is run in DIRECTORY." 337Find is run in DIRECTORY."
352 (interactive "DAdd files under directory: ") 338 (interactive "DAdd files under directory: ")
353 (let ((dir (expand-file-name directory))) 339 (let ((dir (expand-file-name directory)))
354 (if (eq file-cache-find-command-posix-flag 'not-defined) 340 (if (eq file-cache-find-command-posix-flag 'not-defined)
355 (setq file-cache-find-command-posix-flag (file-cache-find-posix-p))) 341 (setq file-cache-find-command-posix-flag
342 (executable-command-find-posix-p file-cache-find-command)))
356 (set-buffer (get-buffer-create file-cache-buffer)) 343 (set-buffer (get-buffer-create file-cache-buffer))
357 (erase-buffer) 344 (erase-buffer)
358 (call-process file-cache-find-command nil 345 (call-process file-cache-find-command nil