;; Created: Sun Nov 10 1996
;; Keywords: convenience
;;
-;; Copyright (C) 1996, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2000, 2002, 2003, 2004,
+;; 2005, 2006 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;; Functions to add files to the cache
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;###autoload
(defun file-cache-add-directory (directory &optional regexp)
"Add DIRECTORY to the file cache.
If the optional REGEXP argument is non-nil, only files which match it will
dir-files)
(file-cache-add-file-list dir-files))))
+;;;###autoload
(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
(mapcar 'file-cache-add-file file-list))
;; Workhorse function
+
+;;;###autoload
(defun file-cache-add-file (file)
"Add FILE to the file cache."
(interactive "fAdd File: ")
file-cache-alist)))
)))
+;;;###autoload
(defun file-cache-add-directory-using-find (directory)
"Use the `find' command to add files to the file cache.
Find is run in DIRECTORY."
"-print")
(file-cache-add-from-file-cache-buffer)))
+;;;###autoload
(defun file-cache-add-directory-using-locate (string)
"Use the `locate' command to add files to the file cache.
STRING is passed as an argument to the locate command."
string)
(file-cache-add-from-file-cache-buffer))
+;;;###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
completion-setup-hook)))
)
(with-output-to-temp-buffer file-cache-completions-buffer
- (display-completion-list completion-list))
+ (display-completion-list completion-list string))
)
)
(setq file-cache-string (file-cache-file-name completion-string))
)
(t
(with-output-to-temp-buffer "*Completions*"
- (display-completion-list all))
+ (display-completion-list all pattern))
))
))