[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 534783c: Make `info-display-manual' pop up the corr
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 534783c: Make `info-display-manual' pop up the correct frame |
Date: |
Tue, 8 Oct 2019 22:10:52 -0400 (EDT) |
branch: master
commit 534783c526000a3320f1d4c0a42d26c39fff6bd0
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Make `info-display-manual' pop up the correct frame
* lisp/info.el (info-display-manual): If the buffer is already in
a window, use that window (bug#20020).
---
lisp/info.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/info.el b/lisp/info.el
index 02f3ea5..fc0d580 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -5338,7 +5338,16 @@ completion alternatives to currently visited manuals."
(setq found buffer
blist nil))))
(if found
- (switch-to-buffer found)
+ (let ((window (get-buffer-window found t)))
+ ;; If the buffer is already displayed in a window somewhere,
+ ;; then select that window (and pop its frame to the top).
+ (if window
+ (progn
+ (raise-frame (window-frame window))
+ (select-frame-set-input-focus (window-frame window))
+ (select-window window))
+ (switch-to-buffer found)))
+ ;; The buffer doesn't exist; create it.
(info-initialize)
(info (Info-find-file manual)
(generate-new-buffer-name "*info*")))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 534783c: Make `info-display-manual' pop up the correct frame,
Lars Ingebrigtsen <=