all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* In C code, how do I create and access a (lisp) variable?
@ 2015-11-04 21:04 Alan Mackenzie
  2015-11-04 21:20 ` Aurélien Aptel
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Mackenzie @ 2015-11-04 21:04 UTC (permalink / raw)
  To: emacs-devel

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).



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

end of thread, other threads:[~2015-11-05 16:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-04 21:04 In C code, how do I create and access a (lisp) variable? Alan Mackenzie
2015-11-04 21:20 ` Aurélien Aptel
2015-11-04 23:39   ` Andreas Schwab
2015-11-05 11:28     ` Aurélien Aptel
2015-11-05 16:43   ` Alan Mackenzie

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.