X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/bba90ab24e80476efcad6b6a770fd5fda522a621..96bd07a3226700156fa7d5ec20e9bd6550c95057:/lisp/filecache.el diff --git a/lisp/filecache.el b/lisp/filecache.el index ae3cb8d074..e754190d17 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el @@ -1,6 +1,6 @@ ;;; 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 ;; Created: Sun Nov 10 1996 @@ -154,11 +154,12 @@ ;; 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) @@ -453,8 +454,9 @@ message reporting the number of file names deleted." (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." @@ -612,7 +614,9 @@ the name is considered already unique; only the second substitution (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) @@ -679,10 +683,7 @@ match REGEXP." "*File Cache Files Matching*"))) (erase-buffer) (insert - (mapconcat - 'identity - results - "\n")) + (mapconcat #'identity results "\n")) (goto-char (point-min)) (display-buffer buf)))