From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.devel Subject: Patch for focus-frame use in RefTeX (was: declare-function in files from Gnus (hashcash.el, imap.el)) Date: Sat, 05 Jan 2008 14:13:50 +0100 Message-ID: <87myrko1o1.fsf@photon.caeruleus.net> References: <200712011634.lB1GYCkr018222@oogie-boogie.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199538832 15421 80.91.229.12 (5 Jan 2008 13:13:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Jan 2008 13:13:52 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 05 14:14:11 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JB8qm-0007bx-EP for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 14:14:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JB8qP-0003xu-Os for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 08:13:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JB8qL-0003xU-PT for emacs-devel@gnu.org; Sat, 05 Jan 2008 08:13:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JB8qJ-0003xI-EJ for emacs-devel@gnu.org; Sat, 05 Jan 2008 08:13:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JB8qJ-0003xF-80 for emacs-devel@gnu.org; Sat, 05 Jan 2008 08:13:39 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.187]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JB8qI-0001kU-RW for emacs-devel@gnu.org; Sat, 05 Jan 2008 08:13:39 -0500 Original-Received: from photon.caeruleus.net (p54A523A9.dip0.t-ipconnect.de [84.165.35.169]) by mrelayeu.kundenserver.de (node=mrelayeu1) with ESMTP (Nemesis) id 0MKwpI-1JB8qH2Y8Q-0005Qs; Sat, 05 Jan 2008 14:13:38 +0100 In-Reply-To: <200712011634.lB1GYCkr018222@oogie-boogie.ics.uci.edu> (Dan Nicolaescu's message of "Sat, 01 Dec 2007 08:34:07 -0800") X-Provags-ID: V01U2FsdGVkX19RMkEpNlevdw2sa65iTh3lti1u/m0jWJ3toHd OyFFt7q1wv0ggLVyM46vTXjuBfbFXQjQAnAT/tGYE2Ckf68w+R o70FeteOTWfa9lDce66yA== X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:86150 Archived-At: * Dan Nicolaescu (2007-12-01) writes: > Talking about RefTeX, can you please fix this warning: > > In reftex-make-separate-toc-frame: > reftex-toc.el:998:35:Warning: `focus-frame' is an obsolete function (as > of Emacs 22.1); it does nothing. Okay, I saw that Glenn went ahead and fixed this in the Emacs trunk. I've just committed a slightly different change in the RefTeX repository. Please apply the following patch to reftex-toc.el in the Emacs repository in order to synchronize both files with respect to this part of the code. 2008-01-05 Ralf Angeli * textmodes/reftex-toc.el (reftex-make-separate-toc-frame): Simplify selection of frame focusing function. --- reftex-toc.el.~1.40.~ 2007-12-08 02:02:19.000000000 +0100 +++ reftex-toc.el 2008-01-05 14:04:15.000000000 +0100 @@ -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 -- Ralf