]> code.delx.au - gnu-emacs/blobdiff - lisp/filecache.el
Include versioned preloaded libraries in `package--builtin-versions'
[gnu-emacs] / lisp / filecache.el
index ae3cb8d074a0fda806ff7c991e4b1ca7cac768e5..e754190d17730ccc2fd301e6b2b207c0522fbe72 100644 (file)
@@ -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 <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)
 
@@ -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)))