diff options
| author | Eli Zaretskii | 2023-06-20 16:35:09 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2023-06-20 16:35:09 +0300 |
| commit | 7637e361d3baeefc7e6ab147ccfccfcc774dcd01 (patch) | |
| tree | 6730ea4ad3b861721c90ca4e9202d4a7487d188d | |
| parent | 2591eb1190a24074357a2f178bc02ddc86c94b43 (diff) | |
| download | emacs-7637e361d3baeefc7e6ab147ccfccfcc774dcd01.tar.gz 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)
| -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." | |||
| 407 | (setq library (substring library 0 (match-beginning 1)))) | 407 | (setq library (substring library 0 (match-beginning 1)))) |
| 408 | ;; Strip extension from .emacs.el to make sure symbol is searched in | 408 | ;; Strip extension from .emacs.el to make sure symbol is searched in |
| 409 | ;; .emacs too. | 409 | ;; .emacs too. |
| 410 | (when (string-match "\\.emacs\\(.el\\)" library) | 410 | (when (string-match "\\.emacs\\(.el\\)\\'" library) |
| 411 | (setq library (substring library 0 (match-beginning 1)))) | 411 | (setq library (substring library 0 (match-beginning 1)))) |
| 412 | (let* ((filename (find-library-name library)) | 412 | (let* ((filename (find-library-name library)) |
| 413 | (regexp-symbol (cdr (assq type find-function-regexp-alist)))) | 413 | (regexp-symbol (cdr (assq type find-function-regexp-alist)))) |