all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Henrik Enberg <henrik+news@enberg.org>
Subject: Re: How to make a command ask "You *really* want to do this?"
Date: Thu, 01 May 2003 01:10:41 +0200	[thread overview]
Message-ID: <87znm7eg3y.fsf@enberg.org> (raw)
In-Reply-To: <5lllxrioqy.fsf@rum.cs.yale.edu> (Stefan Monnier's message of "30 Apr 2003 18:50:29 -0400")

"Stefan Monnier" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu> writes:

>>>>>> "Heinz" == Heinz Rommerskirchen <Heinrich.Rommerskirchen@siemens.com> writes:
>> Years ago I copied the following from the usenet into my .emacs
>> (setq kill-emacs-query-functions
>>       (cons (lambda () (yes-or-no-p "Really kill Emacs? "))
>> 	    kill-emacs-query-functions))
>
> The proper way to write it nowadays is:
>
>   (add-hook 'kill-emacs-query-functions
>             (lambda () (yes-or-no-p "Really kill Emacs? ")))

Or in this particular case: 

        (setq confirm-kill-emacs 'yes-or-no-p)

  reply	other threads:[~2003-04-30 23:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-29  1:51 How to make a command ask "You *really* want to do this?" David Combs
2003-04-29  2:17 ` Jesper Harder
2003-04-29  8:47 ` Heinz Rommerskirchen
2003-04-30 22:50   ` Stefan Monnier
2003-04-30 23:10     ` Henrik Enberg [this message]
2003-04-29 17:27 ` Eric Hanchrow
2003-04-29 17:41   ` Chris McMahan
2003-05-13  9:56 ` Per Abrahamsen
2003-05-23  6:31   ` David Combs

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=87znm7eg3y.fsf@enberg.org \
    --to=henrik+news@enberg.org \
    /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.