Skip to content

Instantly share code, notes, and snippets.

@hadashiA
Created March 21, 2012 03:15
Show Gist options
  • Save hadashiA/2143995 to your computer and use it in GitHub Desktop.
Save hadashiA/2143995 to your computer and use it in GitHub Desktop.
Emacs Lisp macro practice
(defmacro do-with-val-macro (val &rest body)
`(let ((,val 1))
,@body)
)
(defmacro do-with-val-macro2 (spec)
`(let ((,(car spec) 1))
,@(cdr spec))
)
(do-with-val-macro2
(val
(prin1-to-string val)
))
(do-with-val-macro val
(prin1-to-string val))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment