diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-06-20 16:35:09 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-06-20 16:35:09 +0300 |
commit | 7637e361d3baeefc7e6ab147ccfccfcc774dcd01 (patch) | |
tree | 6730ea4ad3b861721c90ca4e9202d4a7487d188d /lisp/emacs-lisp | |
parent | 2591eb1190a24074357a2f178bc02ddc86c94b43 (diff) | |
download | emacs-7637e361d3baeefc7e6ab147ccfccfcc774dcd01.tar.gz emacs-7637e361d3baeefc7e6ab147ccfccfcc774dcd01.tar.bz2 emacs-7637e361d3baeefc7e6ab147ccfccfcc774dcd01.zip |
Don't truncate filenames with "emacs.el" in them
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol):
Avoid false positives when looking for "emacs.el" matches the
likes of "emacs.elpa". (Bug#64143)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/find-func.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index f9f919afb1b..bf890fc35a9 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -407,7 +407,7 @@ The search is done in the source for library LIBRARY." (setq library (substring library 0 (match-beginning 1)))) ;; Strip extension from .emacs.el to make sure symbol is searched in ;; .emacs too. - (when (string-match "\\.emacs\\(.el\\)" library) + (when (string-match "\\.emacs\\(.el\\)\\'" library) (setq library (substring library 0 (match-beginning 1)))) (let* ((filename (find-library-name library)) (regexp-symbol (cdr (assq type find-function-regexp-alist)))) |