Question: how to read elisp declared variable in C code?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question: how to read elisp declared variable in C code?

arthur miller
If I defcustom a variable in Elisp, how do I read
t's value in from within Emacs C source code?
I am sorry for such a newbie question, but if
someone can point me to some example in
sources so I can save some time I will be very
greatfull.

I was able to patch bytecomp.el to allow
byte compilation of "literate elisp", and I can
turn it off/on with elisp variable.

I just need tofix readevalpath for elisp to also
enable off/on for this feature. Readevalloop is btw,
declared as static function in C and not
exposed to elisp, so if I would to implement
everything in Elisp, I would need to rewrite lots
which I don't have neither skills nor time for. I
would just like to introduce a variable to turn
off/on that path, which is quite trivial, I just don't
know how to read Elisp values from C code. Or
do I need to do it other way around and
expose var from C to Elisp?
Reply | Threaded
Open this post in threaded view
|

Re: Question: how to read elisp declared variable in C code?

Eli Zaretskii
> From: arthur miller <[hidden email]>
> Date: Thu, 19 Dec 2019 16:08:04 +0000
>
> If I defcustom a variable in Elisp, how do I read
> t's value in from within Emacs C source code?

Use SYMBOL_VAL.