Commit 0073223c authored by Tino Calancha's avatar Tino Calancha

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.
parent d12e1ddf
......@@ -501,7 +501,8 @@ See")
;; "index ", "old mode", "new mode", "new file mode" and
;; "deleted file mode" are output by git-diff.
(defconst diff-file-junk-re
"diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file")
(concat "Index: \\|=\\{20,\\}\\|" ; SVN
"diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file"))
;; If point is in a diff header, then return beginning
;; of hunk position otherwise return nil.
......@@ -545,7 +546,8 @@ next hunk if TRY-HARDER is non-nil; otherwise signal an error."
(error "Can't find the beginning of the hunk")))
((re-search-backward regexp nil t)) ; In the middle of a hunk.
((re-search-forward regexp nil t) ; At first hunk header.
(forward-line 0))
(forward-line 0)
(t (error "Can't find the beginning of the hunk"))))))
(defun diff-unified-hunk-p ()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment