]> code.delx.au - gnu-emacs-elpa/commitdiff
Update comments, assign version
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 1 Jul 2012 21:27:25 +0000 (01:27 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 1 Jul 2012 21:28:41 +0000 (01:28 +0400)
README.md
diff-hl.el

index 6e82c3ad09f33955a95c3b400367b82a62f4a110..9a0909aa349eda2b04e9f3eca207145cf1fc6961 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,10 +1,13 @@
 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
index 85429d99b019c1efba97856c354fbcf13429445c..76973ab4763aa7f936cc22ae89434abdab4e5e9c 100644 (file)
@@ -1,7 +1,9 @@
 ;;; 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
@@ -220,6 +231,7 @@ in the source file, or the last line of the hunk above it."
                   (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
@@ -281,3 +293,5 @@ in the source file, or the last line of the hunk above it."
   turn-on-diff-hl-mode)\r
 \r
 (provide 'diff-hl)\r
+\r
+;;; diff-hl.el ends here\r