emacs-devel
[Top][All Lists]
Advanced

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

In C code, how do I create and access a (lisp) variable?


From: Alan Mackenzie
Subject: In C code, how do I create and access a (lisp) variable?
Date: Wed, 4 Nov 2015 21:04:20 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Emacs.

Sorry to trouble you all with such a basic question, but I'm feeling
confused about it.

In C code, I want to create a lisp variable, and access its value (which
may have become buffer local, or have become aliased to whatever, or
whatnot).

Is DEFVAR_LISP the right way to define the variable?  This looks fine,
except most uses of the variable `foo', defined by

   DEFVAR_LISP ("foo", Vfoo, doc: /* Doc string*/)

are direct accesses to the C variable `Vfoo'.  Does `Vfoo" contain buffer
local values, for example?  Or do I need to use something like
Fsymbol_value?  If so, where do I get the symbol from (since, there's no
"Sfoo" in the above DEFVAR_LISP.)

If I've missed some documentation somewhere which answers my questions,
apologies, and please direct me to it.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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