From: Dmitry Gutov Date: Tue, 18 Aug 2015 15:22:56 +0000 (+0300) Subject: Merge pull request #51 from tarsius/keep-bindings X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/028b2bf405069d7231e25f2cbf322be0955e6976?hp=bf27c418695214a77cc369b8069f8b9c27d0eb1f Merge pull request #51 from tarsius/keep-bindings Define diff-hl-command-map without destroying existing bindings --- diff --git a/diff-hl.el b/diff-hl.el index 8f2221a7c..18b92c716 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