Subject: Re: bug#73686: 31.0.50; ERC 5.6.1-git: back button gone from describe-face via erc-nicks-list-faces

From: Dmitry Gutov <[email-masked]>
Date: Wed, 9 Oct 2024 04:05:04 +0300

Hi!

On 08/10/2024 09:06, J.P. wrote:
> And because `major-mode' is buffer-local, it gets wiped out with these
> latest changes before `help-buffer' ever sees it:

This is a problem, sorry.

The command in question (erc-nicks-list-faces) doesn't really work for 
me -- it errors with

   No faces matching "\`erc-nicks-"

I've just pushed the patch below to master. Could you try it and see if 
it helps?

diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 4ee4f4156a1..f233633d2ca 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -505,7 +505,8 @@ help-setup-xref
  because we want to record the \"previous\" position of point so we can
  restore it properly when going back."
    (with-current-buffer (help-buffer)
-    (kill-all-local-variables)
+     ;; Re-enable major mode, killing all other local vars.
+    (funcall major-mode)
      (when help-xref-stack-item
        (push (cons (point) help-xref-stack-item) help-xref-stack)
        (setq help-xref-forward-stack nil))