diff options
Diffstat (limited to 'lisp/emacs-lisp/find-func.el')
-rw-r--r-- | lisp/emacs-lisp/find-func.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 9e252d8c529..9802bd4ca9b 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -167,7 +167,8 @@ See the functions `find-function' and `find-variable'." (defun find-library-suffixes () (let ((suffixes nil)) (dolist (suffix (get-load-suffixes) (nreverse suffixes)) - (unless (string-match "elc" suffix) (push suffix suffixes))))) + (unless (string-match "el[cn]" suffix) + (push suffix suffixes))))) (defun find-library--load-name (library) (let ((name library)) @@ -183,8 +184,11 @@ See the functions `find-function' and `find-variable'." LIBRARY should be a string (the name of the library)." ;; If the library is byte-compiled, try to find a source library by ;; the same name. - (when (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library) + (cond + ((string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library) (setq library (replace-match "" t t library))) + ((string-match "\\.eln\\'" library) + (setq library (gethash (file-name-nondirectory library) comp-eln-to-el-h)))) (or (locate-file library (or find-function-source-path load-path) @@ -438,7 +442,7 @@ message about the whole chain of aliases." (cons function (cond ((autoloadp def) (nth 1 def)) - ((subrp def) + ((and (subrp def) (not (subr-native-elisp-p def))) (if lisp-only (error "%s is a built-in function" function)) (help-C-file-name def 'subr)) |