help-gnu-emacs
[Top][All Lists]
Advanced

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

symbols and cells


From: Christopher Howard
Subject: symbols and cells
Date: Thu, 15 May 2014 09:10:05 -0800

I'm still working through the earlier parts of the Elisp
documentation, but I am curious: How does one define the variable cell
and function cell for an /uninterned/ symbol? The docs indicate you
can do this:

(defvar sym (make-symbol "foo"))

But how do you add a function or variable value to foo without
interning it?

On a related note, I'm curious about this perverse construction:

(defvar sym1 (lambda (n) (+ 1 n)))

Is it actually possible to call the the lambda somehow?

ELISP> sym1
(lambda
  (n)
  (+ 1 n))

ELISP> (sym1)
*** Eval error ***  Symbol's function definition is void: sym1
ELISP> (eval sym1)
(lambda
  (n)
  (+ 1 n))

ELISP> ((eval sym1))
*** Eval error ***  Invalid function: (eval sym1)



reply via email to

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