aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index edf7317f2b..c4fac402db 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -1115,7 +1115,7 @@ Only works for unified diffs."
;; A context diff.
((eq (char-after) ?*)
- (if (not (looking-at "\\*\\{15\\}\n\\*\\*\\* \\([0-9]+\\),\\([0-9]+\\) \\*\\*\\*\\*$"))
+ (if (not (looking-at "\\*\\{15\\}\\(?: .*\\)?\n\\*\\*\\* \\([0-9]+\\),\\([0-9]+\\) \\*\\*\\*\\*"))
(error "Unrecognized context diff first hunk header format")
(forward-line 2)
(diff-sanity-check-context-hunk-half
@@ -1131,7 +1131,7 @@ Only works for unified diffs."
;; A unified diff.
((eq (char-after) ?@)
(if (not (looking-at
- "@@ -[0-9]+,\\([0-9]+\\) \\+[0-9]+,\\([0-9]+\\) @@$"))
+ "@@ -[0-9]+,\\([0-9]+\\) \\+[0-9]+,\\([0-9]+\\) @@"))
(error "Unrecognized unified diff hunk header format")
(let ((before (string-to-number (match-string 1)))
(after (string-to-number (match-string 2))))