[Top][All Lists]

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

Re: default-FOO variables

From: Stefan Monnier
Subject: Re: default-FOO variables
Date: Mon, 05 Oct 2009 10:48:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>> >      DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters",
>> >                    &buffer_defaults.enable_multibyte_characters,
>> >                    doc: /* *Default value of `enable-multibyte-characters' 
>> > for buffers not overriding it.
>> >    This is the same as (default-value 'enable-multibyte-characters).  */);
>> > Do we need to avoid such declarations?
>> Yes, the aim is to get rid of them at some point.
>> > If so, how to do the equivalent of that for buffer-local variables
>> > defined in C?
>> I don't understand, why you'd need something equivalent.

> Very simply, I need to add a new buffer-local variable.  The current
> paradigm seems to be:

>  . Add a DEFVAR_LISP_NOPRO for its default value.

>  . Add a DEFVAR_PER_BUFFER for its buffer-local value.

>  . Add one or 2 one-liners to init_buffer_once to initialize
>    buffer_defaults and buffer_local_flags.

> I'm asking what's the New Way of doing this?

Same as before, just skip the step number 1.


reply via email to

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