About\r
=====\r
\r
-`diff-hl-mode` provides IDE-like highlighting on the fringe to the left of the\r
-changed buffer lines, compared to current HEAD.\r
+`diff-hl-mode` provides IDE-like highlighting of `vc-diff` results on the left\r
+fringe of the current buffer.\r
\r
-Since it uses the corresponding VC diff command, it's only accurate when a\r
+Additionally, it defines and binds `diff-hl-diff-goto-hunk` and\r
+`diff-hl-revert-hunk`, to `C-x v =` and `C-x v n` respectively.\r
+\r
+Since it uses the corresponding VC diff command, it's only accurate when the\r
buffer is in saved state.\r
\r
Tested with Git, Mercurial, and Bazaar. May work with other VC backends, too.\r
;;; diff-hl.el --- VC diff fringe highlighting -*- lexical-binding: t -*-\r
\r
;; Author: Dmitry Gutov <dgutov@yandex.ru>\r
+;; URL: https://github.com/dgutov/diff-hl\r
;; Keywords: vc, diff\r
+;; Version: 1.0\r
\r
;; This file is not part of GNU Emacs.\r
\r
;; You should have received a copy of the GNU General Public License\r
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.\r
\r
+;;; Commentary:\r
+\r
+;; `diff-hl-mode' provides IDE-like highlighting of `vc-diff' results\r
+;; on the left fringe of the current buffer.\r
+;;\r
+;; For full description, see README.md or the home page.\r
+\r
+;;; Code:\r
+\r
(require 'diff-mode)\r
(require 'vc)\r
(eval-when-compile\r
(diff-hl-update))))\r
\r
(defun diff-hl-diff-goto-hunk ()\r
- "Open diff buffer and skip to the line corresponding to current."\r
+ "Run VC diff command and go to the line corresponding to current."\r
(interactive)\r
(vc-buffer-sync)\r
(let* ((line (line-number-at-pos))\r
(decf to-go))))))))))\r
\r
(defun diff-hl-revert-hunk ()\r
+ "Revert the diff hunk with changes at or above the point."\r
(interactive)\r
(vc-buffer-sync)\r
(let ((diff-buffer (generate-new-buffer-name "*diff-hl*"))\r
turn-on-diff-hl-mode)\r
\r
(provide 'diff-hl)\r
+\r
+;;; diff-hl.el ends here\r