Zamansky: Learning Elisp #14

Mike Zamansky is back with the next chapter in his Learning Emacs video series. The most recent episodes considered writing a framework to replace certain keywords with an emoji. That started with code to simply replace the keyword with the emoji and moved on to using overlays to display the emoji in the display without altering the underlying text.

The current video considers how to make that code into a minor mode. That turns out to be pretty simple. There’s a macro that handles most of the details for you. You just fill in some parameters and everything else is taken care of.

This is a short video—only 8 minutes, 32 seconds—but Zamansky promises to expand on it in coming episodes. I’ve known—in a vague way—for a long time that making a minor mode was pretty easy but I didn’t realize until this video how simple it is. Once you’ve written the code to do whatever it is the mode is supposed to do, making it into a minor mode boils down to a simple macro call.

I’m looking forward to the future videos that flesh out the process a bit more. Even if you don’t want to publish your minor mode, it can still be useful for streamlining your local workflow. If you do want to share, the process is pretty easy.

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