emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116758: Stop files with same basename messing up fi


From: Glenn Morris
Subject: [Emacs-diffs] trunk r116758: Stop files with same basename messing up finder's package--builtins
Date: Fri, 14 Mar 2014 17:54:15 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116758
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/14010
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2014-03-14 13:54:12 -0400
message:
  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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/Makefile.in               
makefile.in-20091113204419-o5vbwnq5f7feedwu-1831
  lisp/finder.el                 finder.el-20091113204419-o5vbwnq5f7feedwu-499
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-03-14 00:32:41 +0000
+++ b/lisp/ChangeLog    2014-03-14 17:54:12 +0000
@@ -1,5 +1,11 @@
 2014-03-14  Glenn Morris  <address@hidden>
 
+       * finder.el (finder-no-scan-regexp): Add leim-list.
+       (finder-compile-keywords):
+       Don't skip files with same basename.  (Bug#14010)
+       * Makefile.in (setwins_finder): New, excluding leim.
+       (finder-data): Use setwins_finder.
+
        * help-fns.el (help-split-fundoc, help-add-fundoc-usage)
        (help-function-arglist, help-make-usage): Move from here...
        * help.el (help-split-fundoc, help-add-fundoc-usage)

=== modified file 'lisp/Makefile.in'
--- a/lisp/Makefile.in  2014-01-20 07:56:28 +0000
+++ b/lisp/Makefile.in  2014-03-14 17:54:12 +0000
@@ -124,6 +124,15 @@
           esac; \
         done
 
+# Find all subdirectories except `obsolete', `term', and `leim' (and subdirs).
+# We don't want the leim files listed as packages, especially
+# since many share basenames with files in language/.
+setwins_finder=for file in `find ${srcdir} -type d -print`; do \
+          case $$file in ${srcdir}*/obsolete | ${srcdir}*/term | 
${srcdir}*/leim* ) ;; \
+            *) wins="$$wins$${wins:+ }$$file" ;; \
+          esac; \
+        done
+
 # Find all subdirectories in which we might want to create subdirs.el.
 setwins_for_subdirs=for file in `find ${srcdir} -type d -print`; do \
           case $$file in \
@@ -166,7 +175,7 @@
 $(lisp)/finder-inf.el:
        $(MAKE) $(MFLAGS) finder-data
 finder-data: doit
-       $(setwins_almost); \
+       $(setwins_finder); \
        echo Directories: $$wins; \
        $(emacs) -l finder \
          --eval '(setq generated-finder-keywords-file (unmsys--file-name 
"$(srcdir)/finder-inf.el"))' \

=== modified file 'lisp/finder.el'
--- a/lisp/finder.el    2014-03-05 13:09:17 +0000
+++ b/lisp/finder.el    2014-03-14 17:54:12 +0000
@@ -135,7 +135,7 @@
 ;; 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 @@
                                  (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]