From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: confirm to exist when click "X" on the window decoration Date: Mon, 2 Nov 2009 09:18:28 -0800 Message-ID: <7848B26BAEFC42F0A03AD2E5F1E1687B@us.oracle.com> References: <0b82db07-4def-44ca-9ca4-25a9f51cb1a8@h40g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1257184071 17912 80.91.229.12 (2 Nov 2009 17:47:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Nov 2009 17:47:51 +0000 (UTC) To: "'Ender'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 02 18:47:44 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N5104-0005mV-8H for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Nov 2009 18:47:32 +0100 Original-Received: from localhost ([127.0.0.1]:51846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5101-0008Gg-TF for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Nov 2009 12:47:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N50ZM-0008H0-HL for help-gnu-emacs@gnu.org; Mon, 02 Nov 2009 12:19:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N50ZF-0008FP-RG for help-gnu-emacs@gnu.org; Mon, 02 Nov 2009 12:19:50 -0500 Original-Received: from [199.232.76.173] (port=43078 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N50ZD-0008Ey-VX for help-gnu-emacs@gnu.org; Mon, 02 Nov 2009 12:19:44 -0500 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:62650) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N50ZD-000529-Gj for help-gnu-emacs@gnu.org; Mon, 02 Nov 2009 12:19:43 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id nA2HKIC1001003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 2 Nov 2009 17:20:19 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id nA1NwaZW024935; Mon, 2 Nov 2009 17:20:59 GMT Original-Received: from abhmt008.oracle.com by acsmt356.oracle.com with ESMTP id 24432231257182308; Mon, 02 Nov 2009 09:18:28 -0800 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 02 Nov 2009 09:18:28 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <0b82db07-4def-44ca-9ca4-25a9f51cb1a8@h40g2000prf.googlegroups.com> Thread-Index: Acpb4ABXLjYjgDjDQO+w7kMmFYUa2AAADU4A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt355.oracle.com [141.146.40.155] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4AEF14AA.00FC:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69408 Archived-At: > 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.