From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Seiji Zenitani <zenitani@mac.com>
Cc: emacs-devel@gnu.org
Subject: Re: OS X: raise-frame at reopen event
Date: Fri, 10 Aug 2007 19:18:31 +0900 [thread overview]
Message-ID: <wlfy2ritfs.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <C93FCF46-0114-1000-97EA-0FCC77C9A6B1-Webmail-10019@mac.com>
>>>>> On Thu, 09 Aug 2007 15:35:08 -0700, Seiji Zenitani <zenitani@mac.com> 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)
next prev parent reply other threads:[~2007-08-10 10:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-09 22:35 OS X: raise-frame at reopen event Seiji Zenitani
2007-08-09 23:11 ` Randal L. Schwartz
2007-08-10 10:18 ` YAMAMOTO Mitsuharu [this message]
2007-08-10 23:07 ` Seiji Zenitani
2007-08-11 0:18 ` YAMAMOTO Mitsuharu
[not found] ` <E2DE3E97-35A2-4EC3-8DEC-4D1D6FAAD72D@mac.com>
2007-10-17 2:30 ` Seiji Zenitani
2007-10-17 8:21 ` YAMAMOTO Mitsuharu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wlfy2ritfs.wl%mituharu@math.s.chiba-u.ac.jp \
--to=mituharu@math.s.chiba-u.ac.jp \
--cc=emacs-devel@gnu.org \
--cc=zenitani@mac.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).