From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: In C code, how do I create and access a (lisp) variable? Date: Thu, 5 Nov 2015 16:43:00 +0000 Message-ID: <20151105164300.GB2887@acm.fritz.box> References: <20151104210420.GA4618@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1446741706 17075 80.91.229.3 (5 Nov 2015 16:41:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Nov 2015 16:41:46 +0000 (UTC) Cc: Emacs development discussions To: =?iso-8859-1?Q?Aur=E9lien?= Aptel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 05 17:41:31 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZuNbO-0001lf-1e for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 17:41:30 +0100 Original-Received: from localhost ([::1]:33434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNbN-0004B4-GM for ged-emacs-devel@m.gmane.org; Thu, 05 Nov 2015 11:41:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNb8-0004Ay-T7 for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:41:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuNb5-0001CJ-4q for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:41:14 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:22188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuNb4-0001C5-RU for emacs-devel@gnu.org; Thu, 05 Nov 2015 11:41:11 -0500 Original-Received: (qmail 16836 invoked by uid 3782); 5 Nov 2015 16:41:08 -0000 Original-Received: from acm.muc.de (p5B1477AD.dip0.t-ipconnect.de [91.20.119.173]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 05 Nov 2015 17:41:07 +0100 Original-Received: (qmail 6559 invoked by uid 1000); 5 Nov 2015 16:43:00 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193317 Archived-At: Hello, Aurélien. On Wed, Nov 04, 2015 at 10:20:55PM +0100, Aurélien Aptel wrote: > I think you're supposed to use DEFVAR_PER_BUFFER for definition and > BVAR for access. In the end, I was able to find a model to emulate, namely that of Vfontification_functions. That involved doing all of the following: o - Invoking DEFSYM for Qfoo; o - Invoding DEFVAR_LIP for Vfoo; o - Initialising Vfoo to Qnil; o - Calling Fmake_variable_buffer_local (Qfoo). It seems to have worked. -- Alan Mackenzie (Nuremberg, Germany).