From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Seiji Zenitani Newsgroups: gmane.emacs.devel Subject: Re: OS X: raise-frame at reopen event Date: Fri, 10 Aug 2007 16:07:08 -0700 Message-ID: <5325C746-0114-1000-BB79-839BCC1BD7E0-Webmail-10007@mac.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1186787245 9285 80.91.229.12 (10 Aug 2007 23:07:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2007 23:07:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 11 01:07:22 2007 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 1IJdZf-0001SS-8Z for ged-emacs-devel@m.gmane.org; Sat, 11 Aug 2007 01:07:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJdZe-0004WC-JH for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2007 19:07:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IJdZb-0004Vk-CO for emacs-devel@gnu.org; Fri, 10 Aug 2007 19:07:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IJdZY-0004VY-TD for emacs-devel@gnu.org; Fri, 10 Aug 2007 19:07:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJdZY-0004VV-OM for emacs-devel@gnu.org; Fri, 10 Aug 2007 19:07:12 -0400 Original-Received: from smtpout.mac.com ([17.250.248.181]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IJdZY-0006Yq-7Y for emacs-devel@gnu.org; Fri, 10 Aug 2007 19:07:12 -0400 Original-Received: from webmail011 (webmail011-s [10.13.128.11]) by smtpout.mac.com (Xserve/smtpout11/MantshX 4.0) with ESMTP id l7AN78Ap006390; Fri, 10 Aug 2007 16:07:08 -0700 (PDT) in-reply-to: X-Originating-IP: 128.183.134.41 Original-Received: from [128.183.134.41] from webmail.mac.com with HTTP; Fri, 10 Aug 2007 16:07:08 -0700 X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes X-Detected-Kernel: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (1) 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:76334 Archived-At: Thank you for your quick response. Is it possible to install the change to EMACS_22_BASE, too? I believe the change is harmless. Seiji Zenitani zenitani@mac.com On Friday, August 10, 2007, at 06:18AM, "YAMAMOTO Mitsuharu" wrote: >>>>>> On Thu, 09 Aug 2007 15:35:08 -0700, Seiji Zenitani said: > >> How about modifying 'ignore to 'raise-frame in mac-win.el? > >`raise-frame' may make an invisible frame visible. I've installed the >following change to the trunk. > > YAMAMOTO Mitsuharu > mituharu@math.s.chiba-u.ac.jp > >Index: lisp/term/mac-win.el >=================================================================== >RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v >retrieving revision 1.91 >diff -c -p -r1.91 mac-win.el >*** lisp/term/mac-win.el 26 Jul 2007 05:27:30 -0000 1.91 >--- lisp/term/mac-win.el 10 Aug 2007 10:09:17 -0000 >*************** in `selection-converter-alist', which se >*** 1710,1715 **** >--- 1710,1728 ---- > (setq modifiers (cons (car modifier-mask) modifiers))))) > modifiers)) > >+ (defun mac-ae-reopen-application (event) >+ "Show some frame in response to the Apple event EVENT. >+ The frame to be shown is chosen from visible or iconified frames >+ if possible. If there's no such frame, a new frame is created." >+ (interactive "e") >+ (unless (frame-visible-p (selected-frame)) >+ (let ((frame (or (car (visible-frame-list)) >+ (car (filtered-frame-list 'frame-visible-p))))) >+ (if frame >+ (select-frame frame) >+ (switch-to-buffer-other-frame "*scratch*")))) >+ (select-frame-set-input-focus (selected-frame))) >+ > (defun mac-ae-open-documents (event) > "Open the documents specified by the Apple event EVENT." > (interactive "e") >*************** Currently the `mailto' scheme is support >*** 1766,1774 **** > (define-key mac-apple-event-map [core-event open-application] 0) > > ;; Received when a dock or application icon is clicked and Emacs is >! ;; already running. Simply ignored. Another idea is to make a new >! ;; frame if all frames are invisible. >! (define-key mac-apple-event-map [core-event reopen-application] 'ignore) > > (define-key mac-apple-event-map [core-event open-documents] > 'mac-ae-open-documents) >--- 1779,1787 ---- > (define-key mac-apple-event-map [core-event open-application] 0) > > ;; Received when a dock or application icon is clicked and Emacs is >! ;; already running. >! (define-key mac-apple-event-map [core-event reopen-application] >! 'mac-ae-reopen-application) > > (define-key mac-apple-event-map [core-event open-documents] > 'mac-ae-open-documents) > >