]> git.eshelyaron.com Git - emacs.git/commitdiff
Ralf Angeli <angeli at caeruleus.net>
authorGlenn Morris <rgm@gnu.org>
Tue, 8 Jan 2008 05:06:48 +0000 (05:06 +0000)
committerGlenn Morris <rgm@gnu.org>
Tue, 8 Jan 2008 05:06:48 +0000 (05:06 +0000)
(reftex-make-separate-toc-frame): Simplify selection of frame focusing
function.

lisp/ChangeLog
lisp/textmodes/reftex-toc.el

index 7ce308b563b06c9d6390ce09ed3c878b9e4f125d..dc7dd5a41794be54a58309fb5102140494bb3ba0 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-05  Ralf Angeli  <angeli@caeruleus.net>
+
+       * textmodes/reftex-toc.el (reftex-make-separate-toc-frame):
+       Simplify selection of frame focusing function.
+
 2008-01-08  Michael Olson  <mwolson@gnu.org>
 
        * textmodes/remember.el (remember-region): Fix typo in docstring.
index e3d8b3e47930bf388dcac94f3c6b8d5c68ab7295..0e501fdf23ee1b9ec1d90f0032b79f0833de8342 100644 (file)
@@ -1,6 +1,6 @@
 ;;; reftex-toc.el --- RefTeX's table of contents mode
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005,
-;;   2006, 2007 Free Software Foundation, Inc.
+;;   2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@science.uva.nl>
 ;; Maintainer: auctex-devel@gnu.org
@@ -995,10 +995,11 @@ always show the current section in connection with the option
       (select-frame current-toc-frame)
       (switch-to-buffer "*toc*")
       (select-frame current-frame)
-      (if (fboundp 'x-focus-frame) (x-focus-frame current-frame)
-        ;; focus-frame has done nothing in Emacs since at least v21.
-        (if (featurep 'xemacs)
-            (if (fboundp 'focus-frame) (focus-frame current-frame))))
+      (cond ((fboundp 'x-focus-frame)
+             (x-focus-frame current-frame))
+            ((and (featurep 'xemacs) ; `focus-frame' is a nop in Emacs.
+                  (fboundp 'focus-frame))
+             (focus-frame current-frame)))
       (select-window current-window)
       (when (eq reftex-auto-recenter-toc 'frame)
         (unless reftex-toc-auto-recenter-timer