emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS X: raise-frame at reopen event


From: Seiji Zenitani
Subject: Re: OS X: raise-frame at reopen event
Date: Tue, 16 Oct 2007 22:30:38 -0400

Yamamoto-san,

Two months ago, you installed the reopen-frame patch to the trunk for the Mac Carbon port.
Could you install it to EMACS_22_BASE, too?
I have been using the patch on the EMACS_22_BASE branch since then, but I have no problem yet.

Seiji Zenitani
address@hidden


On 2007/08/10, at 9:40, Seiji Zenitani wrote:

Thank you for your quick response.
Is it possible to apply the patch to EMACS_22_BASE, too?
I think the below change is harmless.

Seiji Zenitani
address@hidden

On 2007/08/10, at 6:18, YAMAMOTO Mitsuharu wrote:

On Thu, 09 Aug 2007 15:35:08 -0700, Seiji Zenitani <address@hidden> 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
                                address@hidden

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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]