From 0e19883da585b0105f2340ac7c23764b3ea939c9 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Tue, 8 Oct 2024 17:33:11 -0700 Subject: [PATCH 0/1] *** NOT A PATCH *** *** BLURB HERE *** F. Jason Park (1): [POC] Overload help-xref-following for non-default help buffers lisp/help-mode.el | 21 +++++++++++++-------- test/lisp/emacs-lisp/package-tests.el | 2 +- test/lisp/help-mode-tests.el | 14 +++++++++++++- 3 files changed, 27 insertions(+), 10 deletions(-) Interdiff: diff --git a/lisp/help-mode.el b/lisp/help-mode.el index f704098b2dc..77473125694 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -524,16 +524,14 @@ help-buffer "Return the name of a buffer for inserting help. If `help-xref-following' is t and the current buffer is derived from `help-mode', return the current buffer's name. As a special case, also -do so if these three conditions are met: `help-xref-following' is the -symbol of a major mode deriving from `help-mode', the current buffer is -in `fundamental-mode', and `help-buffer-under-preparation' is non-nil. +do so if `help-xref-following' is the symbol of a major mode deriving +from `help-mode' and the current buffer is in `fundamental-mode'. Otherwise, return \"*Help*\", creating a buffer with that name if it does not already exist." (buffer-name ;for with-output-to-temp-buffer (if (and help-xref-following (if (or (eq help-xref-following t) - (not (and help-buffer-under-preparation - (eq major-mode 'fundamental-mode)))) + (not (eq major-mode 'fundamental-mode))) (derived-mode-p 'help-mode) ; current buffer (provided-mode-derived-p help-xref-following '(help-mode)))) (current-buffer) diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el index 692d6550250..8236f834b02 100644 --- a/test/lisp/emacs-lisp/package-tests.el +++ b/test/lisp/emacs-lisp/package-tests.el @@ -172,7 +172,7 @@ with-fake-help-buffer `(with-temp-buffer (help-mode) ;; Trick `help-buffer' into using the temp buffer. - (let ((help-xref-following t)) + (let ((help-xref-following major-mode)) ,@body))) (defun package-test-strip-version (dir) -- 2.46.2