* buffer-offer-save and *scratch*
@ 2005-04-11 21:57 Kevin Rodgers
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2005-04-11 21:57 UTC (permalink / raw)
In GNU Emacs 21.3.2 (i386-pc-solaris2.8, X toolkit)
of 2003-05-22 on zeus
configured using `configure --prefix=/opt/csw --with-xpm --with-jpeg
--with-png --with-gif'
Important settings:
value of $LC_ALL: C
value of $LC_COLLATE: nil
value of $LC_CTYPE: C
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: C
locale-coding-system: nil
default-enable-multibyte-characters: t
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.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 3+ messages in thread
* buffer-offer-save and *scratch*
@ 2005-04-12 0:37 Luc Teirlinck
2005-04-12 17:06 ` Kevin Rodgers
0 siblings, 1 reply; 3+ messages in thread
From: Luc Teirlinck @ 2005-04-12 0:37 UTC (permalink / raw)
Cc: bug-gnu-emacs
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: buffer-offer-save and *scratch*
2005-04-12 0:37 buffer-offer-save and *scratch* Luc Teirlinck
@ 2005-04-12 17:06 ` Kevin Rodgers
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2005-04-12 17:06 UTC (permalink / raw)
Luc Teirlinck wrote:
> 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.
So the fix is to put this in files.el, right after the defvar and
make-variable-buffer-local forms:
(put 'buffer-offer-save 'permanent-local t)
and the workaround is to put it in site-start.el -- right? I can
confirm that workaround solves my problem.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-12 17:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-12 0:37 buffer-offer-save and *scratch* Luc Teirlinck
2005-04-12 17:06 ` Kevin Rodgers
-- strict thread matches above, loose matches on Subject: below --
2005-04-11 21:57 Kevin Rodgers
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).