emacs-diffs
[Top][All Lists]
Advanced

[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: Mon, 15 Jan 2007 08:10:22 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     YAMAMOTO Mitsuharu <mituharu>   07/01/15 08:10:22

Index: mac-win.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term/mac-win.el,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -b -r1.84 -r1.85
--- mac-win.el  8 Jan 2007 23:02:52 -0000       1.84
+++ mac-win.el  15 Jan 2007 08:10:22 -0000      1.85
@@ -1714,6 +1714,15 @@
              nil t)))))
   (select-frame-set-input-focus (selected-frame)))
 
+(defun mac-ae-quit-application (event)
+  "Quit the application Emacs with the Apple event EVENT."
+  (interactive "e")
+  (let ((ae (mac-event-ae event)))
+    (unwind-protect
+       (save-buffers-kill-emacs)
+      ;; Reaches here if the user has canceled the quit.
+      (mac-resume-apple-event ae -128)))) ; userCanceledErr
+
 (defun mac-ae-get-url (event)
   "Open the URL specified by the Apple event EVENT.
 Currently the `mailto' scheme is supported."
@@ -1740,7 +1749,7 @@
   'mac-ae-open-documents)
 (define-key mac-apple-event-map [core-event show-preferences] 'customize)
 (define-key mac-apple-event-map [core-event quit-application]
-  'save-buffers-kill-emacs)
+  'mac-ae-quit-application)
 
 (define-key mac-apple-event-map [internet-event get-url] 'mac-ae-get-url)
 




reply via email to

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