A piece of intertube about the Clojure programming language, algorithms and artificial intelligence.

Tuesday, November 1, 2011

Earmuffs and variables

According to the Clojure coding standards for libraries, variables names should be written with *earmuffs* only when they are intended to be rebind.

Here and there I forget this rule and use earmuffs most of the time, so I decided to create an Emacs Lisp function to add/remove earmuffs to variable:





Add it to your .emacs file and then place your cursor on a variable and call it with
M-x earmuffy
to add earmuffs, or type
C-u M-x earmuffy
to remove them.

3 comments:

  1. Wouldn't it be nicer to have toggle-earmuffs, which detects what you currently have and toggle it?

    ReplyDelete
  2. I bit the bullet and implemented this: https://gist.github.com/1385279

    ReplyDelete
  3. Thanks for providing a better implementation.

    I'm experimenting with Emacs Lisp time to time but didn't read so much documentation about it yet so it's welcome to see improvement to my experiments.

    ReplyDelete

Followers