A Quick Tutorial on Elisp Macros

Shane Mulligan has an interesting post in which he gives a short tutorial on Elisp macros. He does that by implementing a macro that accepts a Bash shell command and calls the shell to execute it. That boils down to just passing the arguments in the macro call to the shell but there are a few niggling details to deal with.

He starts by building some support macros and functions. He doesn’t explain those until later so if you’re completely new to Elisp macros you can safely skip by the details on first reading. When he starts explaining the macros, he does so by building it up in a series of nonworking versions and explaining what they expand to and why they’re not working.

If you’re new to macros, Mulligan’s post will serve as an easy introduction. It’s by no means a complete exposition but it is a nice start.

This entry was posted in General and tagged . Bookmark the permalink.