[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 5b39231f95 2/3: transient--describe-function:
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 5b39231f95 2/3: transient--describe-function: Handle renamed help buffer better |
Date: |
Sat, 17 Sep 2022 13:29:00 -0400 (EDT) |
branch: externals/transient
commit 5b39231f950733630fead110b7137b29f26da5ae
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient--describe-function: Handle renamed help buffer better
Closes #213.
Re #208.
---
lisp/transient.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 1a28519f73..f07782fc7a 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3670,12 +3670,13 @@ manpage, then try to jump to the correct location."
(defun transient--describe-function (fn)
(describe-function (if (symbolp fn) fn 'transient--anonymous-infix-argument))
(unless (derived-mode-p 'help-mode)
- (when-let ((bw (or (get-buffer "*Help*")
- (cl-find-if (lambda (win)
- (with-current-buffer (window-buffer win)
- (derived-mode-p 'help-mode)))
- (window-list)))))
- (select-window (if (windowp bw) bw (get-buffer-window bw))))))
+ (when-let* ((buf (get-buffer "*Help*"))
+ (win (or (and buf (get-buffer-window buf))
+ (cl-find-if (lambda (win)
+ (with-current-buffer (window-buffer win)
+ (derived-mode-p 'help-mode)))
+ (window-list)))))
+ (select-window win))))
(defun transient--anonymous-infix-argument ()
"Cannot show any documentation for this anonymous infix command.