summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/find-func.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/find-func.el')
-rw-r--r--lisp/emacs-lisp/find-func.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index efbcfb3a722..60b16257a3e 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -188,11 +188,7 @@ LIBRARY should be a string (the name of the library)."
((string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library)
(setq library (replace-match "" t t library)))
((string-match "\\.eln\\'" library)
- ;; From help-fns.el.
- (setq library (expand-file-name (concat (file-name-base library)
- ".el")
- (concat (file-name-directory library)
- "..")))))
+ (setq library (gethash (file-name-nondirectory library) comp-eln-to-el-h))))
(or
(locate-file library
(or find-function-source-path load-path)
@@ -300,12 +296,13 @@ if non-nil)."
(find-library-suffixes)
"\\|"))
(table (cl-loop for dir in (or find-function-source-path load-path)
- when (file-readable-p dir)
+ for dir-or-default = (or dir default-directory)
+ when (file-readable-p dir-or-default)
append (mapcar
(lambda (file)
(replace-regexp-in-string suffix-regexp
"" file))
- (directory-files dir nil
+ (directory-files dir-or-default nil
suffix-regexp))))
(def (if (eq (function-called-at-point) 'require)
;; `function-called-at-point' may return 'require