Mercurial > emacs
comparison lisp/filecache.el @ 53751:e7725f50a432
(file-cache-find-posix-p): Deleted.
(file-cache-add-directory-using-find): Use `executable-command-find-posix-p'.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 29 Jan 2004 17:55:39 +0000 |
parents | 2598e11dc4dd |
children | a8c5903da579 |
comparison
equal
deleted
inserted
replaced
53750:4deb14fde58c | 53751:e7725f50a432 |
---|---|
330 (setq file-cache-alist | 330 (setq file-cache-alist |
331 (cons (cons file-name (list dir-name)) | 331 (cons (cons file-name (list dir-name)) |
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. |
351 Find is run in DIRECTORY." | 337 Find 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 |
359 (get-buffer file-cache-buffer) nil | 346 (get-buffer file-cache-buffer) nil |
360 dir "-name" | 347 dir "-name" |