;ELC   
;;; Compiled by rms@psilocin.ai.mit.edu on Thu May 28 00:14:48 1998
;;; from file /gd/gnu/emacs/lisp/filecache.el
;;; in Emacs version 20.2.93.16
;;; with bytecomp version 2.45
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`filecache.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(custom-declare-group 'file-cache nil "Find files using a pre-loaded cache." :group 'files :group 'convenience :prefix "file-cache-")
#@242 *List of regular expressions used as filters by the file cache.
File names which match these expressions will not be added to the cache.
Note that the functions `file-cache-add-file' and `file-cache-add-file-list' 
do not use this variable.
(custom-declare-variable 'file-cache-filter-regexps '(list "~$" "\\.o$" "\\.exe$" "\\.a$" "\\.elc$" ",v$" "\\.output$" "\\.$" "#$") '(#$ . -742) :type '(repeat regexp) :group 'file-cache)
#@66 *External program used by `file-cache-add-directory-using-find'.
(custom-declare-variable 'file-cache-find-command '"find" '(#$ . -1177) :type 'string :group 'file-cache)
#@68 *External program used by `file-cache-add-directory-using-locate'.
(custom-declare-variable 'file-cache-locate-command '"locate" '(#$ . -1354) :type 'string :group 'file-cache)
#@49 Message to display when there is no completion.
(custom-declare-variable 'file-cache-no-match-message '" [File Cache: No match]" '(#$ . 1537) :type 'string :group 'file-cache)
#@55 Message to display when there is only one completion.
(custom-declare-variable 'file-cache-sole-match-message '" [File Cache: sole completion]" '(#$ . 1719) :type 'string :group 'file-cache)
#@59 Message to display when there is a non-unique completion.
(custom-declare-variable 'file-cache-non-unique-message '" [File Cache: complete but not unique]" '(#$ . 1916) :type 'string :group 'file-cache)
(byte-code "\302\300!\204 \303\300	B\303\207" [file-cache-multiple-directory-message current-load-list boundp nil] 2)
#@58 Buffer to display completions when using the file cache.
(custom-declare-variable 'file-cache-completions-buffer '"*Completions*" '(#$ . 2246) :type 'string :group 'file-cache)
#@41 Buffer to hold the cache of file names.
(custom-declare-variable 'file-cache-buffer '"*File Cache*" '(#$ . 2429) :type 'string :group 'file-cache)
#@47 Regexp to match files in `file-cache-buffer'.
(custom-declare-variable 'file-cache-buffer-default-regexp '"^.+$" '(#$ . 2582) :type 'regexp :group 'file-cache)
(byte-code "\302\300!\204 \303\300	B\303\207" [file-cache-last-completion current-load-list boundp nil] 2)
#@54 Internal data structure to hold cache of file names.
(defvar file-cache-alist nil (#$ . 2858))
#@43 Keymap for file cache completions buffer.
(defvar file-cache-completions-keymap nil (#$ . 2959))
#@133 Add DIRECTORY to the file cache.
If the optional REGEXP argument is non-nil, only files which match it will 
be added to the cache.
(defalias 'file-cache-add-directory #[(directory &optional regexp) "\304!\204 \305\306\"\207\307!\310	\311\n#\312\313\"\210\314!*\207" [directory dir regexp dir-files file-accessible-directory-p message "Directory %s does not exist" expand-file-name directory-files t mapcar #[(file) "\301\302\"\207" [file-cache-filter-regexps mapcar #[(regexp) "\303	\"\205 \304	\n\"\211\207" [regexp file dir-files string-match delq] 3]] 3] file-cache-add-file-list] 4 (#$ . 3063) "DAdd files from directory: "])
#@265 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.
(defalias 'file-cache-add-directory-list #[(directory-list &optional regexp) "\301\302\"\207" [directory-list mapcar #[(dir) "\302	\"\207" [dir regexp file-cache-add-directory] 3]] 3 (#$ . 3713) "XAdd files from directory list: "])
#@58 Add FILE-LIST (a list of files names) to the file cache.
(defalias 'file-cache-add-file-list #[(file-list) "\301\302\"\207" [file-list mapcar file-cache-add-file] 3 (#$ . 4217) "XFile List: "])
#@29 Add FILE to the file cache.
(defalias 'file-cache-add-file #[(file) "\305!\204 \306\307\"\207\310!\311!\312	\"\211\203B \fA;\203) \n\fA\230\2063 \fA<\2053 \n\fA\235?\205J \f\313\nC\fA\"\241\202J 	\nCBB\211+\207" [file file-name dir-name file-cache-alist the-entry file-exists-p message "File %s does not exist" file-name-nondirectory file-name-directory assoc append] 5 (#$ . 4418) "fAdd File: "])
#@82 Use the `find' command to add files to the file cache.
Find is run in DIRECTORY.
(defalias 'file-cache-add-directory-using-find #[(directory) "\305!\306\n!q\210\307 \210\310\311\312\n!\311	\313\f\314\315D>\203! \316\202\" \317\320&\210\321 )\207" [directory dir file-cache-buffer file-cache-find-command system-type expand-file-name get-buffer-create erase-buffer call-process nil get-buffer "-name" windows-nt ms-dos "'*'" "*" "-print" file-cache-add-from-file-cache-buffer] 10 (#$ . 4833) "DAdd files under directory: "])
#@113 Use the `locate' command to add files to the file cache.
STRING is passed as an argument to the locate command.
(defalias 'file-cache-add-directory-using-locate #[(string) "\303!q\210\304 \210\305	\306\307!\306\n%\210\310 \207" [file-cache-buffer file-cache-locate-command string get-buffer-create erase-buffer call-process nil get-buffer file-cache-add-from-file-cache-buffer] 6 (#$ . 5368) "sAdd files using locate string: "])
#@159 Add any entries found in the file cache buffer.
Each entry matches the regular expression `file-cache-buffer-default-regexp'
or the optional REGEXP argument.
(defalias 'file-cache-add-from-file-cache-buffer #[(&optional regexp) "q\210\305\306	\"\210eb\210\307\310\206 \fd\311#\205' \312\313\224\313\225\"\314\n!\210\202 )\207" [file-cache-buffer file-cache-filter-regexps full-filename regexp file-cache-buffer-default-regexp mapcar #[(elt) "eb\210\301!\207" [elt delete-matching-lines] 2] nil re-search-forward t buffer-substring-no-properties 0 file-cache-add-file] 4 (#$ . 5806)])
#@23 Clear the file cache.
(defalias 'file-cache-clear-cache #[nil "\301\211\207" [file-cache-alist nil] 2 (#$ . 6403) nil])
#@34 Delete FILE from the file cache.
(defalias 'file-cache-delete-file #[(file) "\302\303	\"	\"\211\207" [file file-cache-alist delq assoc] 4 (#$ . 6530) (list (completing-read "Delete file from cache: " file-cache-alist))])
#@57 Delete FILE-LIST (a list of files) from the file cache.
(defalias 'file-cache-delete-file-list #[(file-list) "\301\302\"\207" [file-list mapcar file-cache-delete-file] 3 (#$ . 6759) "XFile List: "])
#@51 Delete files matching REGEXP from the file cache.
(defalias 'file-cache-delete-file-regexp #[(regexp) "\302\303\304	\"\210\305!\210\306\307G\")\207" [delete-list file-cache-alist nil mapcar #[(elt) "\303	@\"\205 	@\nB\211\207" [regexp elt delete-list string-match] 3] file-cache-delete-file-list message "Deleted %d files from file cache"] 3 (#$ . 6965) "sRegexp: "])
#@39 Delete DIRECTORY from the file cache.
(defalias 'file-cache-delete-directory #[(directory) "\304!\305\306\307\"\210	\305U\203 \310\311\"\202 \312\313	\"*\207" [directory result dir file-cache-alist expand-file-name 0 mapcar #[(entry) "\303	\"\205 \nT\211\207" [dir entry result file-cache-do-delete-directory] 3] error "No entries containing %s found in cache" message "Deleted %d entries"] 3 (#$ . 7345) "DDelete directory from file cache: "])
(defalias 'file-cache-do-delete-directory #[(dir entry) "A\305	!\n\235\205# G\306\232\203 \307\f\"\211\202# \310\n\"\241*\207" [entry dir directory directory-list file-cache-alist file-cache-canonical-directory 1 delq delete] 4])
#@68 Delete DIRECTORY-LIST (a list of directories) from the file cache.
(defalias 'file-cache-delete-directory-list #[(directory-list) "\301\302\"\207" [directory-list mapcar file-cache-delete-directory] 3 (#$ . 8046) "XDirectory List: "])
(defalias 'file-cache-directory-name #[(file) "\306	\"A\211G\307\307\n<\204 \310\311\"\210\312=\203$ \n\313\234\202] \313=\2032 \310\314\"\210\202] \315\316 !\211\n\235\211\203V \nGZT\211\234\206[ \n\313\211\234\202[ \n\313\211\234*\205g \317\320T#\f,\207" [file file-cache-alist directory-list len directory num assoc nil error "Unknown type in file-cache-alist for key %s" 1 0 "No directory found for key %s" file-name-directory buffer-string format " [%d of %d]" minibuffer-dir dir-list file-cache-multiple-directory-message] 5])
(defalias 'file-cache-file-name #[(file) "\302!\211P)\207" [file directory file-cache-directory-name] 3])
(defalias 'file-cache-canonical-directory #[(dir) "\302\303\304	\305\306O!\"\204 	\307P\202 	)\207" [dir directory char-equal 47 string-to-char -1 nil "/"] 6])
#@363 Complete a filename in the minibuffer using a preloaded cache.
Filecache does two kinds of substitution: it completes on names in
the cache, and, once it has found a unique name, it cycles through
the directories that the name is available in.  With a prefix argument, 
the name is considered already unique; only the second substitution 
(directories) is done.
(defalias 'file-cache-minibuffer-complete #[(arg) "\306\306\307\310 !\311\n\"\306\306\306\204! \f\312=\203H \313\n!\211\310 \230\2034 \314!\202\350 \315 \210\316!\210\205\350 \314!\202\350 \f;\203\336 \n\f\230\203\205 \317\n\"\203\205 =\203y \f\230\203y \315 \210\316\313\f!!\210\306\211\202\350 \314!\210\n\211\202\350 \n\320\n\"\211G\211\321V\203\267 db\210\316\f\nG\306O!\210\322\323\324C\"! \220\325!\221)\202\350 \313\f!\211\310 \230\203\312 \314!\202\350 \315 \210\316!\210\205\350 \314!\202\350 \f\306=\205\350 \314!!.\207" [completion-ignore-case case-fold-search string file-cache-alist completion-string completion-list nil file-name-nondirectory buffer-string try-completion t file-cache-file-name file-cache-temp-minibuffer-message erase-buffer insert-string assoc all-completions 1 reverse append file-cache-completion-setup-function display-completion-list len file-cache-string arg file-cache-sole-match-message file-cache-multiple-directory-message last-command this-command file-cache-last-completion file-cache-non-unique-message completion-setup-hook file-cache-completions-buffer file-cache-no-match-message] 5 (#$ . 9122) "P"])
#@61 A Lisp version of `temp_minibuffer_message' from minibuf.c.
(defalias 'file-cache-temp-minibuffer-message #[(msg) "d\212db\210	c\210)\305\306\307!\210d|\210\205 \310\311C\211*\207" [savemax msg inhibit-quit quit-flag unread-command-events t sit-for 2 nil 7] 2 (#$ . 10698)])
(defalias 'file-cache-completion-setup-function #[nil "q\210	\204 \303\n!\304	\305\306#\210\304	\307\310#\210\311	!\207" [file-cache-completions-buffer file-cache-completions-keymap completion-list-mode-map copy-keymap define-key [mouse-2] file-cache-mouse-choose-completion "" file-cache-choose-completion use-local-map] 4])
#@52 Choose a completion in the `*Completions*' buffer.
(defalias 'file-cache-choose-completion #[nil "\301\302 \210\303\304 !\210\305\306!)\207" [completion-no-auto-exit t choose-completion select-window active-minibuffer-window file-cache-minibuffer-complete nil] 2 (#$ . 11316) nil])
#@37 Choose a completion with the mouse.
(defalias 'file-cache-mouse-choose-completion #[(event) "\302\303	!\210\304\305 !\210\306\307!)\207" [completion-no-auto-exit event t mouse-choose-completion select-window active-minibuffer-window file-cache-minibuffer-complete nil] 2 (#$ . 11605) "e"])
#@21 Debugging function.
(defalias 'file-cache-debug-read-from-minibuffer #[(file) "\302\303\304	\"\"\207" [file file-cache-alist message "%s" assoc] 5 (#$ . 11902) (list (completing-read "File Cache: " file-cache-alist))])
(provide 'filecache)
