From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: default-FOO variables
Date: Mon, 05 Oct 2009 15:57:33 +0200 [thread overview]
Message-ID: <83iqeundte.fsf@gnu.org> (raw)
In-Reply-To: <jwvr5tix8nx.fsf-monnier+emacs@gnu.org>
> 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?
next prev parent reply other threads:[~2009-10-05 13:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-05 12:00 default-FOO variables Eli Zaretskii
2009-10-05 13:39 ` Stefan Monnier
2009-10-05 13:57 ` Eli Zaretskii [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83iqeundte.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.