]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-library-name): Correctly find "f.el.gz" from "f.elc" or "f.elc.gz".
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 25 Sep 2002 18:58:37 +0000 (18:58 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 25 Sep 2002 18:58:37 +0000 (18:58 +0000)
lisp/emacs-lisp/find-func.el

index c05167cc3c99a8630a58b45fa448f544bb741886..1ca39b461f704bc27bf375006e2167579693b14b 100644 (file)
@@ -121,8 +121,8 @@ See the functions `find-function' and `find-variable'."
   "Return the full name of the elisp source of LIBRARY."
   ;; If the library is byte-compiled, try to find a source library by
   ;; the same name.
-  (if (string-match "\\.el\\(c\\(\\..*\\)\\)\\'" library)
-      (setq library (replace-match "" t t library 1)))
+  (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library)
+      (setq library (replace-match "" t t library)))
   (or (locate-file library
                   (or find-function-source-path load-path)
                   (append (find-library-suffixes) '("")))