From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: default-FOO variables Date: Mon, 05 Oct 2009 10:48:34 -0400 Message-ID: References: <83ljjqnj81.fsf@gnu.org> <83iqeundte.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1254754169 12302 80.91.229.12 (5 Oct 2009 14:49:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Oct 2009 14:49:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 05 16:49:26 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MuosO-0005n2-M4 for ged-emacs-devel@m.gmane.org; Mon, 05 Oct 2009 16:49:24 +0200 Original-Received: from localhost ([127.0.0.1]:40526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuosO-0004cM-Mw for ged-emacs-devel@m.gmane.org; Mon, 05 Oct 2009 10:49:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Muorq-0004I5-9C for emacs-devel@gnu.org; Mon, 05 Oct 2009 10:48:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Muorl-0004DS-0S for emacs-devel@gnu.org; Mon, 05 Oct 2009 10:48:49 -0400 Original-Received: from [199.232.76.173] (port=39488 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Muork-0004DD-No for emacs-devel@gnu.org; Mon, 05 Oct 2009 10:48:44 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:23700 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Muore-0000yP-VO; Mon, 05 Oct 2009 10:48:39 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEALOkyUrO+IBv/2dsb2JhbACBUtBshCoEhyg X-IronPort-AV: E=Sophos;i="4.44,505,1249272000"; d="scan'208";a="47109234" Original-Received: from 206-248-128-111.dsl.teksavvy.com (HELO pastel.home) ([206.248.128.111]) by ironport2-out.pppoe.ca with ESMTP; 05 Oct 2009 10:48:35 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id C27A481F0; Mon, 5 Oct 2009 10:48:34 -0400 (EDT) In-Reply-To: <83iqeundte.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 05 Oct 2009 15:57:33 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115914 Archived-At: >> > 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