From: Andreas Schwab Date: Sat, 16 Aug 2014 19:51:27 +0000 (+0200) Subject: Handle missing space marker in unified diff during header fixup X-Git-Tag: emacs-25.0.90~2635^2~679^2~461 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=52e7a5b99f790dcc21cf84ba0ae6537ccee11efc;p=emacs.git Handle missing space marker in unified diff during header fixup * vc/diff-mode.el (diff-fixup-modifs): Handle empty line in context of unified diff. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 458ab57d011..2a1d3b94427 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-08-16 Andreas Schwab + + * vc/diff-mode.el (diff-fixup-modifs): Handle empty line in + context of unified diff. + 2014-08-16 Paul Eggert Add dependencies to fix loaddefs race during parallel builds. diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 4908c5f4961..d4e973956c8 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1220,6 +1220,9 @@ else cover the whole buffer." (?- (cl-incf minus)) (?! (cl-incf bang)) ((or ?\\ ?#) nil) + (?\n (if diff-valid-unified-empty-line + (cl-incf space) + (setq space 0 plus 0 minus 0 bang 0))) (_ (setq space 0 plus 0 minus 0 bang 0))) (cond ((looking-at diff-hunk-header-re-unified)