diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2015-05-18 15:49:13 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2015-05-18 15:50:57 +0300 |
commit | 69d24b40d2ed3cdfa7e79da4c729bddd381c8231 (patch) | |
tree | c48c2877459e95f1542663d546ec11682cceec2c /lisp/vc/log-view.el | |
parent | d3d50a9c99ef42a270127fe0f5a9e435eb760079 (diff) | |
download | emacs-69d24b40d2ed3cdfa7e79da4c729bddd381c8231.tar.gz |
Improve handling of the first Git revision
* lisp/vc/log-view.el (log-view-toggle-entry-display): When
there's no next entry, delete until the end of the buffer.
(log-view-end-of-defun-1): Stop at eob.
* lisp/vc/vc-annotate.el
(vc-annotate-show-diff-revision-at-line-internal): Don't give up
when previous-revision is nil.
* lisp/vc/vc-git.el (vc-git-expanded-log-entry): End the arguments
with `--' to avoid ambiguity.
(vc-git-annotate-extract-revision-at-line): Exclude `^' from the
returned revision string.
(vc-git-annotate-time): Expect `^' before the first revision.
* lisp/vc/vc-git.el (vc-git-diff): Diff against an empty tree if
REV1 is nil, and REV2 is not.
* lisp/vc/vc.el: Update the description of the `diff' function.
Diffstat (limited to 'lisp/vc/log-view.el')
-rw-r--r-- | lisp/vc/log-view.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el index 042ea131a97..19bbc45f927 100644 --- a/lisp/vc/log-view.el +++ b/lisp/vc/log-view.el @@ -404,7 +404,9 @@ This calls `log-view-expanded-log-entry-function' to do the work." (unless (and pos (log-view-inside-comment-p pos)) (error "Broken markup in `log-view-toggle-entry-display'")) (delete-region pos - (next-single-property-change pos 'log-view-comment)) + (or + (next-single-property-change pos 'log-view-comment) + (point-max))) (put-text-property beg (1+ beg) 'log-view-entry-expanded nil) (if (< opoint pos) (goto-char opoint))) @@ -469,7 +471,10 @@ It assumes that a log entry starts with a line matching ((looking-back "Show 2X entries Show unlimited entries" (line-beginning-position)) (setq looping nil) - (forward-line -1)))))) + (forward-line -1)) + ;; There are no buttons if we've turned on unlimited entries. + ((eobp) + (setq looping nil)))))) (defun log-view-end-of-defun (&optional arg) "Move forward to the next Log View entry. |