GNU bug report logs -
#73637
[PATCH] New hook 'help-setup-hook'
Previous Next
Reported by: Eshel Yaron <me <at> eshelyaron.com>
Date: Sat, 5 Oct 2024 07:18:02 UTC
Severity: normal
Tags: patch
Done: Dmitry Gutov <dmitry <at> gutov.dev>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 06/10/2024 09:56, Juri Linkov wrote:
>> Great! I've pushed that patch, please report any new regressions.
> Maybe 'help-xref-forward-stack' and 'help-xref-stack-forward-item'
> should be preserved as well?
Good question - looks like both of these vars are marked as
'permanent-local' already. And the ones I set up to be restored are too.
This suggests a further simplification, pushed to master now:
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index a44749d1fe9..4ee4f4156a1 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -505,19 +505,15 @@ 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)
- (let ((stack-item help-xref-stack-item)
- (stack help-xref-stack))
- (kill-all-local-variables)
- (setq help-xref-stack-item stack-item
- help-xref-stack stack)
- (when help-xref-stack-item
- (push (cons (point) help-xref-stack-item) help-xref-stack)
- (setq help-xref-forward-stack nil))
- (when interactive-p
- (let ((tail (nthcdr 10 help-xref-stack)))
- ;; Truncate the stack.
- (if tail (setcdr tail nil))))
- (setq help-xref-stack-item item))))
+ (kill-all-local-variables)
+ (when help-xref-stack-item
+ (push (cons (point) help-xref-stack-item) help-xref-stack)
+ (setq help-xref-forward-stack nil))
+ (when interactive-p
+ (let ((tail (nthcdr 10 help-xref-stack)))
+ ;; Truncate the stack.
+ (if tail (setcdr tail nil))))
+ (setq help-xref-stack-item item)))
(defvar help-xref-following nil
"Non-nil when following a help cross-reference.")
This bug report was last modified 226 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.