[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 61c91389a4d: help-setup-xref: Simplify further
From: |
Dmitry Gutov |
Subject: |
master 61c91389a4d: help-setup-xref: Simplify further |
Date: |
Sun, 6 Oct 2024 10:40:25 -0400 (EDT) |
branch: master
commit 61c91389a4da90645562a8b80858e62b7526cdd6
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
help-setup-xref: Simplify further
* lisp/help-mode.el (help-setup-xref): Simplify, given that the
vars are marked 'permanent-local' already (bug#73637).
---
lisp/help-mode.el | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
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 @@ This should be called very early, before the output
buffer is cleared,
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.")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 61c91389a4d: help-setup-xref: Simplify further,
Dmitry Gutov <=