Skip to content

Comment on Learn Emacs: Keyboard Macrosparent

Comments

Or just learn a little bit of Elisp, and do this:

    M-: (loop for i from ?a 
              for j below 12 
              do (insert (format "#define %c %d\n" i j)))

Yeah, I considered that, but the situation comes up so infrequently I'd never remember the syntax. I use Python everyday anyway, so it almost comes naturally.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.