Bozhidar Batsov, proprietor of Emacs Redux, is starting an interesting new project: The Emacs Lisp Style Guide. The idea is to create a community contributed set of rules for “good Elisp form.”
Normally, I’d hate that sort of thing. Almost always, style guides end up encoding silly ideas like
if (3 != x) /* constants before variables in C if statements */
or even the incredible coding standard from hell. Throughout my career, I mostly ignored stuff like that. Oddly, though, I find myself in agreement with Batsov’s guide so far. That’s probably just because I already do things pretty much the way he proposes and there are a couple of good ideas that I hadn’t thought of like naming unused lexically scoped local values with a preceding underscore
(lamba (x _y) (* x x))
Old timers are going to do what they’ve always done, of course, but the guide has lots of good advice for less experienced Elispers. The rules are mostly what experienced Lispers do so using them helps promote clear, easily understood code.
Take a look at the guide and let me know what you think. And, of course, if you think something is missing or see something you think is wrong, add your voice to the discussion. It is, after all, a community effort; Batsov has just done the heavy lifting to get things rolling.