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

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

buffer-offer-save and *scratch*


From: Luc Teirlinck
Subject: buffer-offer-save and *scratch*
Date: Mon, 11 Apr 2005 19:37:45 -0500 (CDT)

Kevin Rodgers wrote:

    This form does not have its intended effect in my .emacs file
    (i.e. buffer-offer-save still has its global default value of nil in
    the
    *scratch* buffer):

    (with-current-buffer (get-buffer "*scratch*")
       (setq buffer-offer-save t))

    But if I immediately evaluate it in the *scratch* buffer, it works.

That is because at startup, Emacs sets the major mode of *scratch*
according to `initial-major-mode', _after_ your .emacs is read.
Changing major modes kills all local variables that are not
permanently local, including `buffer-offer-save'.

But `buffer-offer-save' should be permanently local.  Whether you want
to be offered to save the buffer or not has nothing to do with the
major mode.

Sincerely,

Luc.





reply via email to

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