swfl...@flintfam.org (Samuel W. Flint) writes: >>>>>> Marcin Borkowski writes: > > MB> This piece of code: #+BEGIN_SRC elisp :results value verbatim > MB> :exports both (defmacro forty-two () (* 6 7)) > > That is not a macro. That's a function. The return value of a macro > (the result of the last expression in the implicit progn) needs to be a > (quasi-)quoted expression. >
Not so. > This macro simply evaluates to 42. This should be a function. > Maybe it should be a function, but it *is* a macro: --8<---------------cut here---------------start------------->8--- (defmacro forty-two () (* 6 7)) ==> forty-two (symbol-function 'forty-two) ==> (macro lambda nil (* 6 7)) --8<---------------cut here---------------end--------------->8--- > If you want a macro, you could have: > > #+BEGIN_SRC: emacs-lisp > (defmacro forty-two () > '(* 6 7)) > #+END_SRC > That's a different macro: --8<---------------cut here---------------start------------->8--- (defmacro forty-two () '(* 6 7)) ==> forty-two (symbol-function 'forty-two) ==> (macro lambda nil (quote (* 6 7))) --8<---------------cut here---------------end--------------->8--- -- Nick