aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-03-14 13:54:12 -0400
committerGlenn Morris2014-03-14 13:54:12 -0400
commit459d74ef997f15db864b0ff97cddb8c7b5b3d847 (patch)
treef9c1104342aaeae04d6fe52a6389721e70932504
parent83e7ae18375f3998cefd6c60db09099c73a92695 (diff)
downloademacs-459d74ef997f15db864b0ff97cddb8c7b5b3d847.tar.gz
emacs-459d74ef997f15db864b0ff97cddb8c7b5b3d847.zip
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
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/Makefile.in11
-rw-r--r--lisp/finder.el13
3 files changed, 27 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 260a77fdca9..e1d98e3f18a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
12014-03-14 Glenn Morris <rgm@gnu.org> 12014-03-14 Glenn Morris <rgm@gnu.org>
2 2
3 * finder.el (finder-no-scan-regexp): Add leim-list.
4 (finder-compile-keywords):
5 Don't skip files with same basename. (Bug#14010)
6 * Makefile.in (setwins_finder): New, excluding leim.
7 (finder-data): Use setwins_finder.
8
3 * help-fns.el (help-split-fundoc, help-add-fundoc-usage) 9 * help-fns.el (help-split-fundoc, help-add-fundoc-usage)
4 (help-function-arglist, help-make-usage): Move from here... 10 (help-function-arglist, help-make-usage): Move from here...
5 * help.el (help-split-fundoc, help-add-fundoc-usage) 11 * help.el (help-split-fundoc, help-add-fundoc-usage)
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index ebd2432e10c..a1cd6d19ce8 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -124,6 +124,15 @@ setwins_almost=for file in `find ${srcdir} -type d -print`; do \
124 esac; \ 124 esac; \
125 done 125 done
126 126
127# Find all subdirectories except `obsolete', `term', and `leim' (and subdirs).
128# We don't want the leim files listed as packages, especially
129# since many share basenames with files in language/.
130setwins_finder=for file in `find ${srcdir} -type d -print`; do \
131 case $$file in ${srcdir}*/obsolete | ${srcdir}*/term | ${srcdir}*/leim* ) ;; \
132 *) wins="$$wins$${wins:+ }$$file" ;; \
133 esac; \
134 done
135
127# Find all subdirectories in which we might want to create subdirs.el. 136# Find all subdirectories in which we might want to create subdirs.el.
128setwins_for_subdirs=for file in `find ${srcdir} -type d -print`; do \ 137setwins_for_subdirs=for file in `find ${srcdir} -type d -print`; do \
129 case $$file in \ 138 case $$file in \
@@ -166,7 +175,7 @@ custom-deps: doit
166$(lisp)/finder-inf.el: 175$(lisp)/finder-inf.el:
167 $(MAKE) $(MFLAGS) finder-data 176 $(MAKE) $(MFLAGS) finder-data
168finder-data: doit 177finder-data: doit
169 $(setwins_almost); \ 178 $(setwins_finder); \
170 echo Directories: $$wins; \ 179 echo Directories: $$wins; \
171 $(emacs) -l finder \ 180 $(emacs) -l finder \
172 --eval '(setq generated-finder-keywords-file (unmsys--file-name "$(srcdir)/finder-inf.el"))' \ 181 --eval '(setq generated-finder-keywords-file (unmsys--file-name "$(srcdir)/finder-inf.el"))' \
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.")
135;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-01/msg00469.html 135;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-01/msg00469.html
136;; ldefs-boot is not auto-generated, but has nothing useful. 136;; ldefs-boot is not auto-generated, but has nothing useful.
137(defvar finder-no-scan-regexp "\\(^\\.#\\|\\(loaddefs\\|ldefs-boot\\|\ 137(defvar finder-no-scan-regexp "\\(^\\.#\\|\\(loaddefs\\|ldefs-boot\\|\
138cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)" 138cus-load\\|finder-inf\\|esh-groups\\|subdirs\\|leim-list\\)\\.el$\\)"
139 "Regexp matching file names not to scan for keywords.") 139 "Regexp matching file names not to scan for keywords.")
140 140
141(autoload 'autoload-rubric "autoload") 141(autoload 'autoload-rubric "autoload")
@@ -194,7 +194,16 @@ from; the default is `load-path'."
194 (and (string-match el-file-regexp f) 194 (and (string-match el-file-regexp f)
195 (intern (match-string 1 f))))) 195 (intern (match-string 1 f)))))
196 (memq base-name processed)) 196 (memq base-name processed))
197 (push base-name processed) 197;; There are multiple files in the tree with the same basename.
198;; So skipping files based on basename means you randomly (depending
199;; on which order the files are traversed in) miss some packages.
200;; http://debbugs.gnu.org/14010
201;; You might think this could lead to two files providing the same package,
202;; but it does not, because the duplicates are (at time of writing)
203;; all due to files in cedet, which end up with package-override set.
204;; FIXME this is obviously fragile.
205;; Make the (eq base-name package) case below issue a warning?
206;; (push base-name processed)
198 (with-temp-buffer 207 (with-temp-buffer
199 (insert-file-contents (expand-file-name f d)) 208 (insert-file-contents (expand-file-name f d))
200 (setq summary (lm-synopsis) 209 (setq summary (lm-synopsis)