]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't truncate filenames with "emacs.el" in them
authorEli Zaretskii <eliz@gnu.org>
Tue, 20 Jun 2023 13:35:09 +0000 (16:35 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 20 Jun 2023 13:35:09 +0000 (16:35 +0300)
* 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)

lisp/emacs-lisp/find-func.el

index f9f919afb1b259601306a2c9ec26cd237edd38c6..bf890fc35a91cbbb99319d9e04ca337af2f0885a 100644 (file)
@@ -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))))