;;; filecache.el --- find files using a pre-loaded cache
-;; Copyright (C) 1996, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2000-2012 Free Software Foundation, Inc.
;; Author: Peter Breton <pbreton@cs.umb.edu>
;; Created: Sun Nov 10 1996
:group 'file-cache)
(defcustom file-cache-completion-ignore-case
- (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
+ (if (memq system-type '(ms-dos windows-nt cygwin))
t
completion-ignore-case)
"If non-nil, file-cache completion should ignore case.
:group 'file-cache)
(defcustom file-cache-case-fold-search
- (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
+ (if (memq system-type '(ms-dos windows-nt cygwin))
t
case-fold-search)
"If non-nil, file-cache completion should ignore case.
:group 'file-cache)
(defcustom file-cache-ignore-case
- (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
+ (memq system-type '(ms-dos windows-nt cygwin))
"Non-nil means ignore case when checking completions in the file cache.
Defaults to nil on DOS and Windows, and t on other systems."
:type 'boolean
(defun file-cache-add-directory-list (directory-list &optional regexp)
"Add DIRECTORY-LIST (a list of directory names) to the file cache.
If the optional REGEXP argument is non-nil, only files which match it
-will be added to the cache. Note that the REGEXP is applied to the files
-in each directory, not to the directory list itself."
+will be added to the cache. Note that the REGEXP is applied to the
+files in each directory, not to the directory list itself."
(interactive "XAdd files from directory list: ")
(mapcar
(lambda (dir) (file-cache-add-directory dir regexp))
directory-list))
(defun file-cache-add-file-list (file-list)
- "Add FILE-LIST (a list of files names) to the file cache."
+ "Add FILE-LIST (a list of file names) to the file cache.
+Interactively, FILE-LIST is read as a Lisp expression, which
+should evaluate to the desired list of file names."
(interactive "XFile List: ")
(mapcar 'file-cache-add-file file-list))
;;;###autoload
(defun file-cache-add-directory-recursively (dir &optional regexp)
"Adds DIR and any subdirectories to the file-cache.
-This function does not use any external programs
+This function does not use any external programs.
If the optional REGEXP argument is non-nil, only files which match it
-will be added to the cache. Note that the REGEXP is applied to the files
-in each directory, not to the directory list itself."
+will be added to the cache. Note that the REGEXP is applied to the
+files in each directory, not to the directory list itself."
(interactive "DAdd directory: ")
(require 'find-lisp)
(mapcar
(provide 'filecache)
-;; arch-tag: 433d3ca4-4af2-47ce-b2cf-1f727460f538
;;; filecache.el ends here