[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/term/mac-win.el,v
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/term/mac-win.el,v |
Date: |
Fri, 10 Aug 2007 10:13:25 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: YAMAMOTO Mitsuharu <mituharu> 07/08/10 10:13:25
Index: mac-win.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- mac-win.el 26 Jul 2007 05:27:30 -0000 1.91
+++ mac-win.el 10 Aug 2007 10:13:25 -0000 1.92
@@ -1710,6 +1710,19 @@
(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")
@@ -1766,9 +1779,9 @@
(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)
+;; 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)
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el,v,
YAMAMOTO Mitsuharu <=
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el,v, Juri Linkov, 2007/08/15
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el,v, YAMAMOTO Mitsuharu, 2007/08/27
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el,v, Miles Bader, 2007/08/29
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el,v, Dan Nicolaescu, 2007/08/29