help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: no questions when quitting


From: Anselm Helbig
Subject: Re: no questions when quitting
Date: Thu, 07 May 2009 10:59:58 +0200
User-agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.7 Emacs/22.3 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

Hi!

> How can I force emacs to quit immediately after pressing C-x C-c
> without asking any questions.
> I would like all remaining modified buffers to be not saved and all
> running emacs subprocesses to be killed.
> 
> I read in info documentation that confirm-kill-emacs variable adjusts
> this behaviour.
> Unfortunately I don't know to which value I should set it to achieve
> what I want since nil value leads me to yes-or-no-p function.

`confirm-kill-emacs' does something different: you can have it ask for
confirmation even if no buffers need saving. You can achieve this by
binding C-x C-c to `kill-emacs' instead of `save-buffers-kill-emacs':

  (global-set-key (kbd "C-x C-c") 'kill-emacs)

BTW, `save-buffers-kill-emacs' takes a prefix argument in which case
it saves all pending changes automatically - which you said is not
what you want. 

However, you might want to change the way you work: if you need a
buffer with contents you don't want to save, just don't associate a
file with it! Creating sucha buffer is easy, just give switch-buffer
(C-x b) the name of a buffer that doesn't yet exist. You have to set
the major mode you want manually, though.

HTH, 

Anselm


-- 
Anselm Helbig 
mailto:anselm.helbig+news2009@googlemail.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]