From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Henrik Enberg Newsgroups: gmane.emacs.help Subject: Re: How to make a command ask "You *really* want to do this?" Date: Thu, 01 May 2003 01:10:41 +0200 Organization: Le Petomane Appreciation Society Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87znm7eg3y.fsf@enberg.org> References: <5lllxrioqy.fsf@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1051744593 9794 80.91.224.249 (30 Apr 2003 23:16:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2003 23:16:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu May 01 01:16:31 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19B0oR-0002Xi-00 for ; Thu, 01 May 2003 01:16:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19B0ny-0003CG-0A for gnu-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2003 19:16:02 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!fu-berlin.de!uni-berlin.de!h95n2fls32o1112.telia.COM!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 16 Original-NNTP-Posting-Host: h95n2fls32o1112.telia.com (213.65.65.95) Original-X-Trace: fu-berlin.de 1051744281 13271199 213.65.65.95 (16 [125297]) In-Reply-To: <5lllxrioqy.fsf@rum.cs.yale.edu> (Stefan Monnier's message of "30 Apr 2003 18:50:29 -0400") X-Face: '?(}L@K/Sls-ye`; eqx]TJ0IbKhC#K4WeW3yZ5bp|xrU`bKelL+*H0'd*05OmV(iCbG>WuT Iu~v:a2f_8F]^^MSZ$PAF'O?OHX.O.pW5zEuV6)e[YmsU1ehc@(oLF!pD5JBOm]JU# List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9093 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9093 "Stefan Monnier" writes: >>>>>> "Heinz" == Heinz Rommerskirchen 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)