]> code.delx.au - gnu-emacs/blobdiff - lisp/filecache.el
Add seq-find
[gnu-emacs] / lisp / filecache.el
index 69649e105bc1ba6b371d858fc0d8b4c9b03ba8b5..fd99ee0fb93f4e469425cdef3066a6148243fd35 100644 (file)
@@ -1,6 +1,6 @@
 ;;; filecache.el --- find files using a pre-loaded cache
 
 ;;; filecache.el --- find files using a pre-loaded cache
 
-;; Copyright (C) 1996, 2000-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2000-2015 Free Software Foundation, Inc.
 
 ;; Author:  Peter Breton <pbreton@cs.umb.edu>
 ;; Created: Sun Nov 10 1996
 
 ;; 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$"
   ;; 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."
   "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)
 
   :type '(repeat regexp)
   :group 'file-cache)
 
@@ -613,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
                      (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)
          (setq file-cache-string (file-cache-file-name completion-string))
          (if (string= file-cache-string (minibuffer-contents))
              (minibuffer-message file-cache-sole-match-message)