diff options
| author | Tino Calancha | 2017-01-29 18:49:10 +0900 |
|---|---|---|
| committer | Tino Calancha | 2017-01-29 18:49:10 +0900 |
| commit | 0073223c23749ffd6bd3f882bc30a82cc37efd2a (patch) | |
| tree | c65df1341ae7f9f88a8bf1b3bdb16755cda93975 | |
| parent | d12e1ddf42cddcac56f98c5b3a65f5219d2d5968 (diff) | |
| download | emacs-0073223c23749ffd6bd3f882bc30a82cc37efd2a.tar.gz emacs-0073223c23749ffd6bd3f882bc30a82cc37efd2a.zip | |
Fix Bug#25524
* lisp/vc/diff-mode.el (diff-beginning-of-hunk):
Return position at the beginning off the hunk.
(diff-file-junk-re): Add SVN keywords.
| -rw-r--r-- | lisp/vc/diff-mode.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index b7ad8e8ebd8..e609ca9f943 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -501,7 +501,8 @@ See http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01990.html") | |||
| 501 | ;; "index ", "old mode", "new mode", "new file mode" and | 501 | ;; "index ", "old mode", "new mode", "new file mode" and |
| 502 | ;; "deleted file mode" are output by git-diff. | 502 | ;; "deleted file mode" are output by git-diff. |
| 503 | (defconst diff-file-junk-re | 503 | (defconst diff-file-junk-re |
| 504 | "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file") | 504 | (concat "Index: \\|=\\{20,\\}\\|" ; SVN |
| 505 | "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file")) | ||
| 505 | 506 | ||
| 506 | ;; If point is in a diff header, then return beginning | 507 | ;; If point is in a diff header, then return beginning |
| 507 | ;; of hunk position otherwise return nil. | 508 | ;; of hunk position otherwise return nil. |
| @@ -545,7 +546,8 @@ next hunk if TRY-HARDER is non-nil; otherwise signal an error." | |||
| 545 | (error "Can't find the beginning of the hunk"))) | 546 | (error "Can't find the beginning of the hunk"))) |
| 546 | ((re-search-backward regexp nil t)) ; In the middle of a hunk. | 547 | ((re-search-backward regexp nil t)) ; In the middle of a hunk. |
| 547 | ((re-search-forward regexp nil t) ; At first hunk header. | 548 | ((re-search-forward regexp nil t) ; At first hunk header. |
| 548 | (forward-line 0)) | 549 | (forward-line 0) |
| 550 | (point)) | ||
| 549 | (t (error "Can't find the beginning of the hunk")))))) | 551 | (t (error "Can't find the beginning of the hunk")))))) |
| 550 | 552 | ||
| 551 | (defun diff-unified-hunk-p () | 553 | (defun diff-unified-hunk-p () |