* default-FOO variables
@ 2009-10-05 12:00 Eli Zaretskii
2009-10-05 13:39 ` Stefan Monnier
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2009-10-05 12:00 UTC (permalink / raw)
To: emacs-devel
What does this entry in NEWS:
** All the default-FOO variables that hold the default value of the FOO
variable, are now declared obsolete.
mean for variable declaration in C such as this:
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? If so, how to do the
equivalent of that for buffer-local variables defined in C?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: default-FOO variables
2009-10-05 12:00 default-FOO variables Eli Zaretskii
@ 2009-10-05 13:39 ` Stefan Monnier
2009-10-05 13:57 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2009-10-05 13:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
> What does this entry in NEWS:
> ** All the default-FOO variables that hold the default value of the FOO
> variable, are now declared obsolete.
> mean for variable declaration in C such as this:
> 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.
Can you give us some details?
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: default-FOO variables
2009-10-05 13:39 ` Stefan Monnier
@ 2009-10-05 13:57 ` Eli Zaretskii
2009-10-05 14:48 ` Stefan Monnier
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2009-10-05 13:57 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Mon, 05 Oct 2009 09:39:37 -0400
>
> > 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?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: default-FOO variables
2009-10-05 13:57 ` Eli Zaretskii
@ 2009-10-05 14:48 ` Stefan Monnier
2009-10-06 9:49 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2009-10-05 14:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
>> > 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.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: default-FOO variables
2009-10-05 14:48 ` Stefan Monnier
@ 2009-10-06 9:49 ` Eli Zaretskii
2009-10-06 13:28 ` Stefan Monnier
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2009-10-06 9:49 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Mon, 05 Oct 2009 10:48:34 -0400
>
> > . 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.
And what about the lines such as this:
buffer_defaults.overwrite_mode = Qnil;
Should we skip these as well?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: default-FOO variables
2009-10-06 9:49 ` Eli Zaretskii
@ 2009-10-06 13:28 ` Stefan Monnier
2009-10-06 14:32 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2009-10-06 13:28 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
> And what about the lines such as this:
> buffer_defaults.overwrite_mode = Qnil;
> Should we skip these as well?
No. These are important because they set the (default-value 'foo).
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: default-FOO variables
2009-10-06 13:28 ` Stefan Monnier
@ 2009-10-06 14:32 ` Eli Zaretskii
0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2009-10-06 14:32 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Tue, 06 Oct 2009 09:28:24 -0400
>
> > And what about the lines such as this:
> > buffer_defaults.overwrite_mode = Qnil;
> > Should we skip these as well?
>
> No. These are important because they set the (default-value 'foo).
Okay, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-10-06 14:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-05 12:00 default-FOO variables Eli Zaretskii
2009-10-05 13:39 ` Stefan Monnier
2009-10-05 13:57 ` Eli Zaretskii
2009-10-05 14:48 ` Stefan Monnier
2009-10-06 9:49 ` Eli Zaretskii
2009-10-06 13:28 ` Stefan Monnier
2009-10-06 14:32 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.