I cloned this for Emacs so that you won't look like you're writing code in a web browser of all places. Mostly because I wanted to see if this would be easier to implement in Emacs Lisp than JavaScript...it was.
https://github.com/bitemyapp/dotfiles/blob/master/.emacs#L36...
Nota Bene: I wrote this ages ago back when people first talked about Hacker Typer.