diff options
author | Gerd Moellmann <gerd@gnu.org> | 2000-07-20 20:35:27 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2000-07-20 20:35:27 +0000 |
commit | f457975a0cde9c8c2674f6c178a4c0314c600509 (patch) | |
tree | 7d125c9c04dbab8f0404eebb53bb62633d82dbfb /lisp/info-look.el | |
parent | bd7acc8d7c8626963a34786ecb8bdb4631b5e9e4 (diff) | |
download | emacs-f457975a0cde9c8c2674f6c178a4c0314c600509.tar.gz |
(info-lookup): If *info* is shown in another frame
on the same display, select that frame, instead of switching to
the Info buffer in another window of the selected frame.
Diffstat (limited to 'lisp/info-look.el')
-rw-r--r-- | lisp/info-look.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/info-look.el b/lisp/info-look.el index ec21adc875f..e39adb36317 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -332,8 +332,18 @@ If optional argument QUERY is non-nil, query for the help mode." (if (or (not info-lookup-other-window-flag) (eq (current-buffer) (get-buffer "*info*"))) (info) - (save-window-excursion (info)) - (switch-to-buffer-other-window "*info*")) + (progn + (save-window-excursion (info)) + ;; Determine whether or not the Info buffer is visible in + ;; another frame on the same display. If it is, simply raise + ;; that frame. Otherwise, display it in another window. + (let* ((window (get-buffer-window "*info*" t)) + (info-frame (and window (window-frame window)))) + (if (and info-frame + (display-multi-frame-p) + (memq info-frame (frames-on-display-list))) + (select-frame info-frame) + (switch-to-buffer-other-window "*info*"))))) (while (and (not found) modes) (setq doc-spec (info-lookup->doc-spec topic (car modes))) (while (and (not found) doc-spec) |