emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp info-look.el


From: Martin Rudalics
Subject: [Emacs-diffs] emacs/lisp info-look.el
Date: Sun, 23 Nov 2008 17:40:00 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Martin Rudalics <m061211>       08/11/23 17:40:00

Modified files:
        lisp           : info-look.el 

Log message:
        (info-lookup): When Info buffer is visible on
        another frame, raise that frame.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/info-look.el?cvsroot=emacs&r1=1.65&r2=1.66

Patches:
Index: info-look.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/info-look.el,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- info-look.el        30 Jul 2008 20:29:53 -0000      1.65
+++ info-look.el        23 Nov 2008 17:40:00 -0000      1.66
@@ -335,22 +335,23 @@
              (cons (list Info-current-file Info-current-node (point))
                    Info-history))))
          found doc-spec node prefix suffix doc-found)
-    (if (not (eq major-mode 'Info-mode))
+    (unless (eq major-mode 'Info-mode)
        (if (not info-lookup-other-window-flag)
            (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))))
+       (let* ((info-window (get-buffer-window "*info*" t))
+              (info-frame (and info-window (window-frame info-window))))
              (if (and info-frame
+                  (not (eq info-frame (selected-frame)))
                       (display-multi-frame-p)
-                      (memq info-frame (frames-on-display-list))
-                      (not (eq info-frame (selected-frame))))
-                 (select-frame info-frame)
-               (switch-to-buffer-other-window "*info*"))))))
+                  (memq info-frame (frames-on-display-list)))
+             ;; *info* is visible in another frame on same display.
+             ;; Raise that frame and select the window.
+             (progn
+               (select-window info-window)
+               (raise-frame info-frame))
+           ;; In any other case, switch to *info* in another window.
+           (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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]