chrisdone/god-mode — pull request #44 by dillonkearns (2014-02-28 08:43:23+00:00)
Title: Key interpreter refactor

Hey @chrisdone, I would be love to get your feedback on this refactor. I think this simplifies a few things.

It's a bit more modular in a few places, in preparation for a change I'm working on that allows you to use `describe-key` with god-mode keybindings (I find it quite annoying to have hold down ctrl to find out what a key is bound to while I'm in god-mode).

```lisp
(defun god-mode-describe-key ()
"Like `describe-key', but uses god-mode keybindings."
(interactive)
(describe-function (god-mode-lookup-key-sequence)))
```

Also, these keybindings fold into the core god-mode key interpreter:

```lisp
(define-key map (kbd "g") 'god-mode-meta)
(define-key map (kbd "G") 'god-mode-control-meta)
```

It might be better to move `god-literal-sequence` back into an argument to avoid global state. Let me know your thoughts on that. I'm open to any suggestions to help improve this!

Cheers,

Dillon