From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Friedrich Laher Newsgroups: gmane.emacs.help Subject: Re: focus return to old frame after make-frame Date: Fri, 05 Aug 2005 23:06:28 +0200 Message-ID: <42F3D4D4.7020906@schmieder-laher.de> References: <42F368C3.2050704@schmieder-laher.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1123277305 995 80.91.229.2 (5 Aug 2005 21:28:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Aug 2005 21:28:25 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 05 23:28:23 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E19iX-0006po-Gx for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Aug 2005 23:27:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E19lP-0004ru-7E for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Aug 2005 17:29:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E19kX-0004Zr-K3 for help-gnu-emacs@gnu.org; Fri, 05 Aug 2005 17:29:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E19kL-0004V2-AZ for help-gnu-emacs@gnu.org; Fri, 05 Aug 2005 17:29:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E19kL-0004MF-0e for help-gnu-emacs@gnu.org; Fri, 05 Aug 2005 17:28:53 -0400 Original-Received: from [212.227.126.177] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E19cM-0003Hy-9E for help-gnu-emacs@gnu.org; Fri, 05 Aug 2005 17:20:38 -0400 Original-Received: from p54A18460.dip0.t-ipconnect.de [84.161.132.96] (helo=schmieder-laher.de) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKwpI-1E19PF498g-0001wZ; Fri, 05 Aug 2005 23:07:05 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en Original-To: Kevin Rodgers , help-gnu-emacs@gnu.org In-Reply-To: X-Provags-ID: kundenserver.de abuse@kundenserver.de login:d0a55953dfb65f372f82ef4b3cf5b37b X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:28458 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28458 T H A N K ' S Kevin. Works! Will cost me much study to understand it. (what's the correct way to answers in this mailing list? - ( so the archive is built correctly ) ) Kevin Rodgers wrote: > Friedrich Laher wrote: > > Is it possible - by lisp-code - to get the focus back to the former > > frame after evaluation of (make-frame ...) ? > > Does this work: > > (defadvice make-frame (around focus-frame activate) > "Restore focus to the (previously) selected frame." > (let ((selected-frame (selected-frame)) > (focus-function (intern (format "%s-focus-frame" > window-system)))) > ad-do-it > (when (fboundp focus-function) > (funcall focus-function selected-frame))))