[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4ea8ab77e2: Make `M-x apropos' respect help-window-select
From: |
Lars Ingebrigtsen |
Subject: |
master 4ea8ab77e2: Make `M-x apropos' respect help-window-select |
Date: |
Sat, 30 Apr 2022 15:34:33 -0400 (EDT) |
branch: master
commit 4ea8ab77e295fc508fc910e8278540ebcce293fb
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make `M-x apropos' respect help-window-select
* lisp/apropos.el (apropos-print): Respect help-window-select.
(apropos): Mention it (bug#46034).
---
lisp/apropos.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lisp/apropos.el b/lisp/apropos.el
index a98f2328ac..79c4df10d2 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -663,7 +663,10 @@ search for matches for any two (or more) of those words.
With \\[universal-argument] prefix, or if `apropos-do-all' is non-nil,
consider all symbols (if they match PATTERN).
-Return list of symbols and documentation found."
+Return list of symbols and documentation found.
+
+The *Apropos* window will be selected if `help-window-select' is
+non-nil."
(interactive (list (apropos-read-pattern "symbol")
current-prefix-arg))
(setq apropos--current (list #'apropos pattern do-all))
@@ -1249,7 +1252,9 @@ as a heading."
(apropos-print-doc 5 'apropos-widget t)
(apropos-print-doc 4 'apropos-plist nil))
(setq-local truncate-partial-width-windows t)
- (setq-local truncate-lines t))))
+ (setq-local truncate-lines t)))
+ (when help-window-select
+ (select-window (get-buffer-window "*Apropos*"))))
(prog1 apropos-accumulator
(setq apropos-accumulator ()))) ; permit gc
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 4ea8ab77e2: Make `M-x apropos' respect help-window-select,
Lars Ingebrigtsen <=