# HG changeset patch # User Glenn Morris # Date 1199768755 0 # Node ID 2b38ed4ed1bbac5a430a04c1676fc69528cbd5ef # Parent 5c2a2ef4063cfd3019fd383ffb1d537d9bba6840 Ralf Angeli (reftex-make-separate-toc-frame): Simplify selection of frame focusing function. diff -r 5c2a2ef4063c -r 2b38ed4ed1bb lisp/textmodes/reftex-toc.el --- a/lisp/textmodes/reftex-toc.el Tue Jan 08 05:03:11 2008 +0000 +++ b/lisp/textmodes/reftex-toc.el Tue Jan 08 05:05:55 2008 +0000 @@ -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 ;; Maintainer: auctex-devel@gnu.org @@ -995,10 +995,11 @@ (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