tags 25410 patch quit >> (`unified >>- (while (re-search-forward >>- (eval-when-compile >>- (let ((no-LF-at-eol-re "\\(?:\\\\.*\n\\)?")) >>- (concat "^\\(?:-.*\n\\)+" no-LF-at-eol-re >>- "\\(\\)" >>- "\\(?:\\+.*\n\\)+" no-LF-at-eol-re))) >>- end t) [...] >> + (while (re-search-forward "^-" end t) >> + (let ((beg-del (progn (beginning-of-line) (point))) >> + beg-add end-add) >> + (when (and (setq beg-add (diff--forward-while-leading-char ?- end)) >> + (or (diff--forward-while-leading-char ?\\ end) t) >> + (setq end-add (diff--forward-while-leading-char ?+ end))) Actually I made a mistake here, this doesn't allow for "\ No newline at end of file" in the + part of the hunk. Here's v2 (seems I hit Reply instead of Followup when sending v1, so it didn't reach the list).