Skip to content

Instantly share code, notes, and snippets.

@earl-ducaine
Created December 22, 2019 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earl-ducaine/3151a85c5b2a0ee6888ccab306cd28da to your computer and use it in GitHub Desktop.
Save earl-ducaine/3151a85c5b2a0ee6888ccab306cd28da to your computer and use it in GitHub Desktop.
Emit macro
(defun emit-defreplace (name newname)
(let ((form
'(defmacro name (&body body)
`(newname ,@body))))
(setf (cadr form) name)
(setf (car (cadr (cadddr form))) newname)
form))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment