[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it possible not to quit emacs when buffer is modified?
From: |
A.Politz |
Subject: |
Re: Is it possible not to quit emacs when buffer is modified? |
Date: |
Wed, 19 Aug 2009 21:49:14 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Aug 20, 2:22 am, YOUNG <breadn...@gmail.com> wrote:
> Hi,
>
> If a buffer does not connect to a file but it is modified, if you type
> c-x c, emacs just quits and losts the data.
>
> Is there a way to protect of it?
>
> Regards,
> Youngwhan
One way to avoid this is the `buffer-offer-save' variable, e.g like
this.
(add-hook 'first-change-hook
#'(lambda nil
;; set for all 'regular' buffers
(unless (string-match "\\`[ *].*[*]\\'"
(buffer-name))
(setq buffer-offer-save t))))
-ap