diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-01-02 22:55:38 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-01-02 23:01:42 +0100 |
commit | 2239cc81b72e0c066d83271f5c9b4d8097b1ce0d (patch) | |
tree | 2369e79248fbe5a80102c516ad39e93f055b51d0 /lisp/emacs-lisp/find-func.el | |
parent | 25332bb0d396b79b37e6eaf96850ac560eaa55cd (diff) | |
download | emacs-2239cc81b72e0c066d83271f5c9b4d8097b1ce0d.tar.gz emacs-2239cc81b72e0c066d83271f5c9b4d8097b1ce0d.tar.bz2 emacs-2239cc81b72e0c066d83271f5c9b4d8097b1ce0d.zip |
Extend find-library-suffixes and find-library-name for eln support
Diffstat (limited to 'lisp/emacs-lisp/find-func.el')
-rw-r--r-- | lisp/emacs-lisp/find-func.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 167ead3ce02..86b5e5456f0 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,7 +184,7 @@ 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) + (when (string-match "\\.el\\([cn]\\(\\..*\\)?\\)\\'" library) (setq library (replace-match "" t t library))) (or (locate-file library |