diff options
author | Basil L. Contovounesios <basil@contovou.net> | 2024-04-30 08:31:58 +0200 |
---|---|---|
committer | Basil L. Contovounesios <basil@contovou.net> | 2024-05-01 12:38:51 +0200 |
commit | 65fa47e3fa15c5553974a6d99080f21b4117245b (patch) | |
tree | 2dce0534e487caaaa2feda5aa3197b478cdac8f4 /lisp/emacs-lisp | |
parent | 54dbd8b4fa2253682d044cc53bd658e361bff8a0 (diff) | |
download | emacs-65fa47e3fa15c5553974a6d99080f21b4117245b.tar.gz |
Assume match before calling help-xref-button
help-xref-button fails if not preceded by a valid match, so a
preceding unconditional search should not be allowed to fail
silently.
* lisp/emacs-lisp/ert.el (ert-describe-test):
* lisp/help-fns.el (help-fns--compiler-macro)
(help-fns-function-description-header, describe-variable)
(help-fns--customize-variable, describe-face)
(help-fns--face-attributes, describe-keymap): Let unconditional
re-search-backward before help-xref-button fail early, as that would
indicate a logic bug, and the backtrace would more accurately point
to the actual source of the mistake.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/ert.el | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 8ab57d2b238..6a665c8181d 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -2816,8 +2816,7 @@ To be used in the ERT results buffer." (insert (format-message " defined in `%s'" (file-name-nondirectory file-name))) (save-excursion - (re-search-backward (substitute-command-keys "`\\([^`']+\\)'") - nil t) + (re-search-backward (substitute-command-keys "`\\([^`']+\\)'")) (help-xref-button 1 'help-function-def test-name file-name))) (insert ".") (fill-region-as-paragraph (point-min) (point)) |