Hi, Eli Zaretskii writes: >> Date: Sat, 05 Oct 2024 09:14:54 +0200 >> From: Eshel Yaron via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" > > Stefan, any comments? > >> --- a/lisp/help-fns.el >> +++ b/lisp/help-fns.el >> @@ -280,7 +280,12 @@ xref-backend-references >> >> (defun help-fns--setup-xref-backend () >> (add-hook 'xref-backend-functions #'elisp--xref-backend nil t) >> - (setq-local semantic-symref-filepattern-alist '((help-mode "*.el")))) >> + (setq-local semantic-symref-filepattern-alist '((help-mode "*.el"))) >> + (add-hook 'help-setup-hook >> + (lambda () >> + (kill-local-variable 'xref-backend-functions) >> + (kill-local-variable 'semantic-symref-filepattern-alist)) >> + nil t)) > > Please add comments here to explain why the hook does these things. OK, see updated patch below. >> --- a/lisp/help-mode.el >> +++ b/lisp/help-mode.el >> @@ -492,6 +492,13 @@ help-xref-url-regexp >> (purecopy "\\<[Uu][Rr][Ll][ \t\n]+['`‘]\\([^'’]+\\)['’]") >> "Regexp matching doc string references to a URL.") >> >> +(defvar-local help-setup-hook nil >> + "Functions to call with no arguments when populating \"*Help*\" buffers. > > Please mention in the doc string which function(s) call(s) this hook. Done. >> - ;; Disable `outline-minor-mode' in a reused Help buffer >> - ;; created by `describe-bindings' that enables this mode. > > This useful comment is lost as result of your patch. Is that on > purpose? Yes, this change obviates the need for this comment, as the code no longer caters for describe-bindings specifically, it just runs a hook. > Finally, I think this hook should be added to the list of the standard > hooks in the ELisp manual. Done in the patch below. Thanks for taking a look.