|
From: | Henrik Enberg |
Subject: | Re: How to make a command ask "You *really* want to do this?" |
Date: | Thu, 01 May 2003 01:10:41 +0200 |
User-agent: | Gnus/5.09002 (Oort Gnus v0.20) Emacs/21.3.50 (gnu/linux) |
"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)
[Prev in Thread] | Current Thread | [Next in Thread] |