branch: master commit 028b2bf405069d7231e25f2cbf322be0955e6976 Merge: bf27c41 7ea8159 Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
Merge pull request #51 from tarsius/keep-bindings Define diff-hl-command-map without destroying existing bindings --- diff-hl.el | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/diff-hl.el b/diff-hl.el index 8f2221a..18b92c7 100644 --- a/diff-hl.el +++ b/diff-hl.el @@ -437,13 +437,13 @@ in the source file, or the last line of the hunk above it." (interactive) (diff-hl-next-hunk t)) -(define-prefix-command 'diff-hl-command-map) - -(let ((map diff-hl-command-map)) - (define-key map "n" 'diff-hl-revert-hunk) - (define-key map "[" 'diff-hl-previous-hunk) - (define-key map "]" 'diff-hl-next-hunk) - map) +(defvar diff-hl-command-map + (let ((map (make-sparse-keymap))) + (define-key map "n" 'diff-hl-revert-hunk) + (define-key map "[" 'diff-hl-previous-hunk) + (define-key map "]" 'diff-hl-next-hunk) + map)) +(fset 'diff-hl-command-map diff-hl-command-map) ;;;###autoload (define-minor-mode diff-hl-mode