Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
025a24b5
Commit
025a24b5
authored
Jan 15, 2007
by
YAMAMOTO Mitsuharu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(mac-ae-quit-application): New function.
(mac-apple-event-map): Bind "quit application" Apple event to it.
parent
00d972eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
lisp/term/mac-win.el
lisp/term/mac-win.el
+10
-1
No files found.
lisp/term/mac-win.el
View file @
025a24b5
...
...
@@ -1714,6 +1714,15 @@ in `selection-converter-alist', which see."
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 @@ Currently the `mailto' scheme is supported."
'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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment