bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#17467: 24.3; locate-library returning spurious path


From: Alex Kosorukoff
Subject: bug#17467: 24.3; locate-library returning spurious path
Date: Sun, 11 May 2014 11:55:18 -0700

Yes, this makes sense. Here is a patch that the issues you mentioned.

(locate-library "tramp.el.gz")
(locate-library "tramp.el")
(locate-library "tramp")

all are working as expected

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: address@hidden
# target_branch: :parent
# testament_sha1: 66b596e6da58c1cb71dedd7fa9ba2fcf20e2964c
# timestamp: 2014-05-11 11:48:22 -0700
# base_revision_id: address@hidden
#   1mzcrftziwhrw9hl
# Begin patch
=== modified file 'lisp/subr.el'
--- lisp/subr.el        2014-04-09 01:48:07 +0000
+++ lisp/subr.el        2014-05-11 18:48:13 +0000
@@ -1857,10 +1857,13 @@
                                        load-path (get-load-suffixes)))
                     nil nil
                     t))
-  (let ((file (locate-file library
-                          (or path load-path)
-                          (append (unless nosuffix (get-load-suffixes))
-                                  load-file-rep-suffixes))))
+  (let ((file
+         (locate-file library
+                      (or path load-path)
+                      (unless (or nosuffix (string-suffix-p ".el.gz" library))
+                        (if (string-suffix-p ".el" library)
+                            load-file-rep-suffixes
+                          (get-load-suffixes))))))
     (if interactive-call
        (if file
            (message "Library is file %s" (abbreviate-file-name file))

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWYwVAfIAAv3/gDIwFUBQY//3
cwgAAL////BQBZY8tZs1llc7udAaowkqTTQZAM0gBoxAaaAAAJKajTEap+ijaR6I0AA0AAACRTQk
2iTTyJiTTR6j0jJoNAyYgHMAAAAAAAAAABUogmgJgmJiGmpkm0j1MIaAyTLbLDZxNRGLHnrLAyW9
r/aHw7fgG/B1bYJK8emKqTIKmSSJCycvA8sP7hSOWceg7jgMYw8fyi0yw11PqgkQRnWDExNp4bj8
RqO+pIz8yQ2Fww34e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Z31VyN/3Y0OPNR8lnc8X3uvYVaHQNaGlKqxkd7SclywzFyp1l9wyLlklikzNRgWl7YmZFhi
qlE45zGmiSvR+fEjEPBrF82OsnFmkj2sT8NrVpYmr2TM27xjE6wFxhtqWFuEUb7RYB7BMIShLUFE
ZcHNnN0x+WDJCbytnYuXWukzWKFC1sUKSJLFaW3eWAZVe1p6CZcKqW44HeMqWXK1L8WfaquSxY+R
2LJVoYHitMnNlMJMaKKVWVTsc50S9NdIfFFr4mDau6p8kyptF8zTp3pnTC1eoUQpFEvkXI/dHRPP
Vt6zGnryeP4u5IpwoSEYKgPk



On Sun, May 11, 2014 at 11:10 AM, Eli Zaretskii <address@hidden> wrote:
> From: Alex Kosorukoff <address@hidden>
> Date: Sun, 11 May 2014 10:53:34 -0700
> Cc: address@hidden
>
> did you mean the following
>
> (locate-library "tramp.el") returning the path to tramp.el.gz?

Yes.  But also (locate-library "tramp.el") being able to find
tramp.el.


reply via email to

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