summaryrefslogtreecommitdiff
path: root/lisp/finder.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-03-14 13:54:12 -0400
committerGlenn Morris <rgm@gnu.org>2014-03-14 13:54:12 -0400
commit459d74ef997f15db864b0ff97cddb8c7b5b3d847 (patch)
treef9c1104342aaeae04d6fe52a6389721e70932504 /lisp/finder.el
parent83e7ae18375f3998cefd6c60db09099c73a92695 (diff)
downloademacs-459d74ef997f15db864b0ff97cddb8c7b5b3d847.tar.gz
Stop files with same basename messing up finder's package--builtins
* lisp/Makefile.in (setwins_finder): New, excluding leim. (finder-data): Use setwins_finder. * lisp/finder.el (finder-no-scan-regexp): Add leim-list. (finder-compile-keywords): Don't skip files with same basename. Fixes: debbugs:14010
Diffstat (limited to 'lisp/finder.el')
-rw-r--r--lisp/finder.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/finder.el b/lisp/finder.el
index 4729389d89f..ad4fda355ec 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -135,7 +135,7 @@ Keywords and package names both should be symbols.")
;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-01/msg00469.html
;; ldefs-boot is not auto-generated, but has nothing useful.
(defvar finder-no-scan-regexp "\\(^\\.#\\|\\(loaddefs\\|ldefs-boot\\|\
-cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)"
+cus-load\\|finder-inf\\|esh-groups\\|subdirs\\|leim-list\\)\\.el$\\)"
"Regexp matching file names not to scan for keywords.")
(autoload 'autoload-rubric "autoload")
@@ -194,7 +194,16 @@ from; the default is `load-path'."
(and (string-match el-file-regexp f)
(intern (match-string 1 f)))))
(memq base-name processed))
- (push base-name processed)
+;; There are multiple files in the tree with the same basename.
+;; So skipping files based on basename means you randomly (depending
+;; on which order the files are traversed in) miss some packages.
+;; http://debbugs.gnu.org/14010
+;; You might think this could lead to two files providing the same package,
+;; but it does not, because the duplicates are (at time of writing)
+;; all due to files in cedet, which end up with package-override set.
+;; FIXME this is obviously fragile.
+;; Make the (eq base-name package) case below issue a warning?
+;; (push base-name processed)
(with-temp-buffer
(insert-file-contents (expand-file-name f d))
(setq summary (lm-synopsis)