comparison lisp/term/mac-win.el @ 83652:5b644ae74c91

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 846-851) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 88-92) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 242-244) - Update from CVS Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-31
author Miles Bader <miles@gnu.org>
date Mon, 13 Aug 2007 13:51:08 +0000
parents 65663fcd2caa fa6a18bcd764
children 2a69b973fae2
comparison
equal deleted inserted replaced
83651:47230f3f349b 83652:5b644ae74c91
1711 (dolist (modifier-mask mac-keyboard-modifier-mask-alist) 1711 (dolist (modifier-mask mac-keyboard-modifier-mask-alist)
1712 (if (/= (logand modifiers-value (cdr modifier-mask)) 0) 1712 (if (/= (logand modifiers-value (cdr modifier-mask)) 0)
1713 (setq modifiers (cons (car modifier-mask) modifiers))))) 1713 (setq modifiers (cons (car modifier-mask) modifiers)))))
1714 modifiers)) 1714 modifiers))
1715 1715
1716 (defun mac-ae-reopen-application (event)
1717 "Show some frame in response to the Apple event EVENT.
1718 The frame to be shown is chosen from visible or iconified frames
1719 if possible. If there's no such frame, a new frame is created."
1720 (interactive "e")
1721 (unless (frame-visible-p (selected-frame))
1722 (let ((frame (or (car (visible-frame-list))
1723 (car (filtered-frame-list 'frame-visible-p)))))
1724 (if frame
1725 (select-frame frame)
1726 (switch-to-buffer-other-frame "*scratch*"))))
1727 (select-frame-set-input-focus (selected-frame)))
1728
1716 (defun mac-ae-open-documents (event) 1729 (defun mac-ae-open-documents (event)
1717 "Open the documents specified by the Apple event EVENT." 1730 "Open the documents specified by the Apple event EVENT."
1718 (interactive "e") 1731 (interactive "e")
1719 (let ((ae (mac-event-ae event))) 1732 (let ((ae (mac-event-ae event)))
1720 (dolist (file-name (mac-ae-list ae nil 'undecoded-file-name)) 1733 (dolist (file-name (mac-ae-list ae nil 'undecoded-file-name))
1767 ;; Accept it as an Apple event, but no Emacs event is generated so as 1780 ;; Accept it as an Apple event, but no Emacs event is generated so as
1768 ;; not to erase the splash screen. 1781 ;; not to erase the splash screen.
1769 (define-key mac-apple-event-map [core-event open-application] 0) 1782 (define-key mac-apple-event-map [core-event open-application] 0)
1770 1783
1771 ;; Received when a dock or application icon is clicked and Emacs is 1784 ;; Received when a dock or application icon is clicked and Emacs is
1772 ;; already running. Simply ignored. Another idea is to make a new 1785 ;; already running.
1773 ;; frame if all frames are invisible. 1786 (define-key mac-apple-event-map [core-event reopen-application]
1774 (define-key mac-apple-event-map [core-event reopen-application] 'ignore) 1787 'mac-ae-reopen-application)
1775 1788
1776 (define-key mac-apple-event-map [core-event open-documents] 1789 (define-key mac-apple-event-map [core-event open-documents]
1777 'mac-ae-open-documents) 1790 'mac-ae-open-documents)
1778 (define-key mac-apple-event-map [core-event show-preferences] 'customize) 1791 (define-key mac-apple-event-map [core-event show-preferences] 'customize)
1779 (define-key mac-apple-event-map [core-event quit-application] 1792 (define-key mac-apple-event-map [core-event quit-application]