I would have thought that both of the funcall
's the follow would have yielded the same result, but they don't and I'm trying to understand why.
(defmacro test/z () "z")
(funcall (function test/z)) ;; => "z"
(funcall (eval `(function ,(intern "test/z")))) ;; => Invalid function: test/z
Looking at the arguments of each call, they evaluate to the same thing:
(eq (function test/z) (eval `(function ,(intern "test/z")))) ;; => t
What really has me scratching my head that is that if I use defun
instead of defmacro
funcall
then works in both calls..
I think I'm missing something in my understanding and I'm hoping someone can straighten me out. I'm reading the elisp info manual, but haven't found anything.
What's going on here?