]> code.delx.au - gnu-emacs-elpa/commit
Define diff-hl-command-map without destroying existing bindings
authorJonas Bernoulli <jonas@bernoul.li>
Tue, 18 Aug 2015 12:15:38 +0000 (14:15 +0200)
committerJonas Bernoulli <jonas@bernoul.li>
Tue, 18 Aug 2015 15:07:18 +0000 (17:07 +0200)
commit7ea8159acb41adb743342bcab9d8a2efa50868b9
tree6f9ec1d240d0e2ca851ce80fcf9c86846e72a7c2
parentbf27c418695214a77cc369b8069f8b9c27d0eb1f
Define diff-hl-command-map without destroying existing bindings

Keymaps are usually defined using `defvar' which has the advantage that
it only sets a variables value if that is not defined yet.  As a result
re-evaluating (i.e. during development) a buffer that contains such a
definition does not reset the value, which would lose all user
customization.

Unfortunately `define-prefix-command' does not do that.  So use `defvar'
to define the variable and then also store the in the function cell
using `fset'.
diff-hl.el