]> code.delx.au - gnu-emacs-elpa/commitdiff
Merge commit '87ba2f6e77ab0ade0da2d9f6368ae34640a8fd83' from diff-hl
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 12 Feb 2014 00:47:36 +0000 (02:47 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 12 Feb 2014 00:47:36 +0000 (02:47 +0200)
1  2 
packages/diff-hl/diff-hl-margin.el
packages/diff-hl/diff-hl.el

index eb871b225a8c64154255e305c5818eb2f2a0d45f,dac0b853d64ed25187e0b60f5450dcd4ad4c36b3..dac0b853d64ed25187e0b60f5450dcd4ad4c36b3
@@@ -1,6 -1,6 +1,6 @@@
  ;;; diff-hl-margin.el --- Highlight buffer changes on margins -*- lexical-binding: t -*-
  
- ;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
+ ;; Copyright (C) 2012-2014  Free Software Foundation, Inc.
  
  ;; This file is part of GNU Emacs.
  
@@@ -19,7 -19,7 +19,7 @@@
  
  ;;; Commentary:
  
- ;; This is a global mode, it modified `diff-hl-mode' to use the margin
+ ;; This is a global mode, it modifies `diff-hl-mode' to use the margin
  ;; instead of the fringe. To toggle, type `M-x diff-hl-margin-mode'.
  ;;
  ;; Compared to the default behavior, this makes `diff-hl-mode'
index 056d300ca766828212c4ec0bd0e88355ba3001ed,0494c0fd1ad5ac97b8963a893cef8133e4339d8f..0494c0fd1ad5ac97b8963a893cef8133e4339d8f
@@@ -1,11 -1,11 +1,11 @@@
  ;;; diff-hl.el --- Highlight uncommitted changes -*- lexical-binding: t -*-\r
  \r
- ;; Copyright (C) 2012-2013  Free Software Foundation, Inc.\r
+ ;; Copyright (C) 2012-2014  Free Software Foundation, Inc.\r
  \r
  ;; Author:   Dmitry Gutov <dgutov@yandex.ru>\r
  ;; URL:      https://github.com/dgutov/diff-hl\r
  ;; Keywords: vc, diff\r
- ;; Version:  1.5.1\r
+ ;; Version:  1.5.2\r
  ;; Package-Requires: ((cl-lib "0.2"))\r
  \r
  ;; This file is part of GNU Emacs.\r
@@@ -89,6 -89,9 +89,9 @@@
    '((default :inherit diff-header))\r
    "Face used to highlight unregistered files.")\r
  \r
+ (defconst diff-hl-command-prefix (kbd "C-x v")\r
+   "The prefix for all `diff-hl' commands.")\r
\r
  (defcustom diff-hl-draw-borders t\r
    "Non-nil to draw borders around fringe indicators."\r
    :group 'diff-hl\r
@@@ -401,13 -404,19 +404,19 @@@ in the source file, or the last line o
    (interactive)\r
    (diff-hl-next-hunk t))\r
  \r
+ (define-prefix-command 'diff-hl-command-map)\r
\r
+ (let ((map diff-hl-command-map))\r
+   (define-key map "n" 'diff-hl-revert-hunk)\r
+   (define-key map "[" 'diff-hl-previous-hunk)\r
+   (define-key map "]" 'diff-hl-next-hunk)\r
+   map)\r
\r
  ;;;###autoload\r
  (define-minor-mode diff-hl-mode\r
    "Toggle VC diff highlighting."\r
    :lighter "" :keymap `(([remap vc-diff] . diff-hl-diff-goto-hunk)\r
-                         (,(kbd "C-x v n") . diff-hl-revert-hunk)\r
-                         (,(kbd "C-x v [") . diff-hl-previous-hunk)\r
-                         (,(kbd "C-x v ]") . diff-hl-next-hunk))\r
+                         (,diff-hl-command-prefix . diff-hl-command-map))\r
    (if diff-hl-mode\r
        (progn\r
          (diff-hl-maybe-define-bitmaps)\r
                             (when (characterp event)\r
                               (push (cons (string event) binding) smart-keys))))\r
                         map)))\r
-       (scan diff-hl-mode-map)\r
-       (smartrep-define-key diff-hl-mode-map "C-x v" smart-keys))))\r
+       (scan diff-hl-command-map)\r
+       (smartrep-define-key diff-hl-mode-map diff-hl-command-prefix smart-keys))))\r
  \r
  (defun diff-hl-dir-update ()\r
    (dolist (pair (if (vc-dir-marked-files)\r