unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Question: how to read elisp declared variable in C code?
@ 2019-12-19 16:08 arthur miller
  2019-12-19 18:52 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: arthur miller @ 2019-12-19 16:08 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 894 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 4052 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question: how to read elisp declared variable in C code?
  2019-12-19 16:08 Question: how to read elisp declared variable in C code? arthur miller
@ 2019-12-19 18:52 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2019-12-19 18:52 UTC (permalink / raw)
  To: arthur miller; +Cc: emacs-devel

> From: arthur miller <arthur.miller@live.com>
> 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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-19 18:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-19 16:08 Question: how to read elisp declared variable in C code? arthur miller
2019-12-19 18:52 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).