(find-library-name): Correctly find "f.el.gz" from "f.elc" or "f.elc.gz".
This commit is contained in:
parent
f2d2436d43
commit
1a40d81d1a
1 changed files with 2 additions and 2 deletions
|
@ -121,8 +121,8 @@ See the functions `find-function' and `find-variable'."
|
||||||
"Return the full name of the elisp source of LIBRARY."
|
"Return the full name of the elisp source of LIBRARY."
|
||||||
;; If the library is byte-compiled, try to find a source library by
|
;; If the library is byte-compiled, try to find a source library by
|
||||||
;; the same name.
|
;; the same name.
|
||||||
(if (string-match "\\.el\\(c\\(\\..*\\)\\)\\'" library)
|
(if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library)
|
||||||
(setq library (replace-match "" t t library 1)))
|
(setq library (replace-match "" t t library)))
|
||||||
(or (locate-file library
|
(or (locate-file library
|
||||||
(or find-function-source-path load-path)
|
(or find-function-source-path load-path)
|
||||||
(append (find-library-suffixes) '("")))
|
(append (find-library-suffixes) '("")))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue