[Top][All Lists]

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

Re: Proposal: `buffer-offer-save' be made a permanent-local

From: Stefan Monnier
Subject: Re: Proposal: `buffer-offer-save' be made a permanent-local
Date: Mon, 14 Jun 2010 09:38:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> No.  If buffer-offer-save is bound to a major-mode, then it should not
>> be permanent-local (i.e. if that variable is permanent-local, then the
>> major-mode will need to use change-major-mode-hook to kill that var
>> explicitly).
> So, the burden is shifted from major-mode authors and users to check/test for
> the property where the check has not otherwise been explicitly required of
> either in the past?

I have no idea what "check/test" you're referring to.

>> AFAICT, all current uses of buffer-offer-save in Emacs are in places
>> where the major-mode is not expected to change and where, in case it
>> does change, it doesn't matter much what happens anyway.
> So, is it fair to assume that for these major-mode's which are not
> expected to change there is no particular benefit/gain of having
> buffer-offer-save permanent-local?


>> The exchange explains how making kill-buffer-hook permanent-local is not
>> too terrible, because specific major-modes can override the permanence
>> via change-major-mode-hook.  That same argument applies to any variable,
>> including buffer-offer-save.
> Maybe, but they don't necessarily apply in the same way though b/c:
>  - buffer-offer-save is a boolean**;

Why would that matter?

>  - buffer-offer-save is a buffer-local whereas kill-buffer-hook is a
>    kind of "buffer-global";

The permanent-local property only matters when the variable is
buffer-local, so the fact that buffer-offer-save is always buffer-local
whereas kill-buffer-hook is only sometimes so is irrelevant.

> In this thread below RMS establishes a clear recipe for how he
> suggest to address exactly this sort of issue:

This is unrelated to buffer-offer-save.


reply via email to

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