Re: string to macro





(defmacro call-mac2 (&body body)
(let ((str (caar body))
(cmd (cdar body)))
`(,(read-from-string str) ,@cmd)))

(call-mac2
("with-open-file" (s "tmp.txt"
:direction :output :if-exists :supersede)
(format s "Here are a couple~%of test data lines~%")))
.



Relevant Pages