Hacker News new | ask | show | jobs
by yuan 5330 days ago
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)))
1 comments

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.