diffs are concatenated with no intervening line.
+2007-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * diff-mode.el (diff-sanity-check-hunk): Fix up the case when unified
+ diffs are concatenated with no intervening line.
+
2007-09-10 Dave Love <fx@gnu.org>
* progmodes/python.el: Merge changes from Dave Love's v2007-Sep-10.
(while
(case (char-after)
(?\s (decf before) (decf after) t)
- (?- (decf before) t)
+ (?-
+ (if (and (looking-at diff-file-header-re)
+ (zerop before) (zerop after))
+ ;; No need to query: this is a case where two patches
+ ;; are concatenated and only counting the lines will
+ ;; give the right result. Let's just add an empty
+ ;; line so that our code which doesn't count lines
+ ;; will not get confused.
+ (progn (save-excursion (insert "\n")) nil)
+ (decf before) t))
(?+ (decf after) t)
(t
(cond