Skip to content

Instantly share code, notes, and snippets.

@m2ym
Created March 28, 2012 03:02
Show Gist options
  • Save m2ym/2223200 to your computer and use it in GitHub Desktop.
Save m2ym/2223200 to your computer and use it in GitHub Desktop.
SLIME-like macro expansion for Emacs Lisp
(defun pp-macroexpand ()
(interactive)
(save-excursion
(pp-macroexpand-expression (read (current-buffer)))))
(dolist (map (list lisp-interaction-mode-map emacs-lisp-mode-map))
(define-key map (kbd "C-c RET") 'pp-macroexpand))
(when (featurep 'popwin)
(push '("*Pp Macroexpand Output*" :noselect t) popwin:special-display-config))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment