]> git.eshelyaron.com Git - emacs.git/commit
Assume match before calling help-xref-button
authorBasil L. Contovounesios <basil@contovou.net>
Tue, 30 Apr 2024 06:31:58 +0000 (08:31 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 6 May 2024 16:30:39 +0000 (18:30 +0200)
commit3779b9dff3609fef7047c7f236cdd84f89dd2e0d
tree13173b117b101d6d63387a00e5e6ec8b55e59422
parent1eac5f56e42e535710ebba0cdc62bfbe12760af7
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.

(cherry picked from commit 65fa47e3fa15c5553974a6d99080f21b4117245b)
lisp/emacs-lisp/ert.el
lisp/help-fns.el