From: "Drew Adams" <drew.adams@oracle.com>
To: "'Ender'" <oldcode@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: confirm to exist when click "X" on the window decoration
Date: Mon, 2 Nov 2009 09:18:28 -0800 [thread overview]
Message-ID: <7848B26BAEFC42F0A03AD2E5F1E1687B@us.oracle.com> (raw)
In-Reply-To: <0b82db07-4def-44ca-9ca4-25a9f51cb1a8@h40g2000prf.googlegroups.com>
> Sometimes I click the "X" on the emacs window decoration by mistake,
> emacs will exist without any prompt/waring when there are no file
> changes in all opening buffers. I want to know if there are anyway to
> make emacs ask to confirm to exist on this situation? Generally I used
> to exist emacs by "C-x C-c". If I click the "X", this should always be
> a mistake.
I use this:
(add-hook 'kill-emacs-query-functions
(lambda () (y-or-n-p "Do you really want to exit Emacs? "))
'append)
That lets you click the X to delete a window, but if it's the last window, then
you are queried to confirm that you want to quit Emacs.
next prev parent reply other threads:[~2009-11-02 17:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-02 7:32 confirm to exist when click "X" on the window decoration Ender
2009-11-02 17:18 ` Drew Adams [this message]
2009-11-02 22:16 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7848B26BAEFC42F0A03AD2E5F1E1687B@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=oldcode@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.