;;; filecache.el --- find files using a pre-loaded cache
-;; Copyright (C) 1996, 2000-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2000-2016 Free Software Foundation, Inc.
;; Author: Peter Breton <pbreton@cs.umb.edu>
;; Created: Sun Nov 10 1996
;; These are also used in buffers containing lines of file names,
;; so the end-of-name is matched with $ rather than \\'.
(list "~$" "\\.o$" "\\.exe$" "\\.a$" "\\.elc$" ",v$" "\\.output$"
- "\\.$" "#$" "\\.class$")
+ "\\.$" "#$" "\\.class$" "/\\.#")
"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."
+ :version "25.1" ; added "/\\.#"
:type '(repeat regexp)
:group 'file-cache)
(dolist (f files)
(if (file-cache-delete-file f)
(setq n (1+ n))))
- (message "Filecache: uncached %d file name%s."
- n (if (= n 1) "" "s"))))
+ (when message
+ (message "Filecache: uncached %d file name%s."
+ n (if (= n 1) "" "s")))))
(defun file-cache-delete-file-regexp (regexp)
"Delete files matching REGEXP from the file cache."
(append completion-setup-hook
(list 'file-cache-completion-setup-function))))
(with-output-to-temp-buffer file-cache-completions-buffer
- (display-completion-list completion-list string))))
+ (display-completion-list
+ (completion-hilit-commonality completion-list
+ (length string))))))
(setq file-cache-string (file-cache-file-name completion-string))
(if (string= file-cache-string (minibuffer-contents))
(minibuffer-message file-cache-sole-match-message)
"*File Cache Files Matching*")))
(erase-buffer)
(insert
- (mapconcat
- 'identity
- results
- "\n"))
+ (mapconcat #'identity results "\n"))
(goto-char (point-min))
(display-buffer buf)))