emacs-devel
[Top][All Lists]
Advanced

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

Re: default-FOO variables


From: Eli Zaretskii
Subject: Re: default-FOO variables
Date: Mon, 05 Oct 2009 15:57:33 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> 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?




reply via email to

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