]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix concatenation of "^" with diff-file-junk-re
authorTino Calancha <tino.calancha@gmail.com>
Wed, 24 May 2017 01:54:48 +0000 (10:54 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Wed, 24 May 2017 01:54:48 +0000 (10:54 +0900)
This regexp contains "\\|", thus a concatenation
of "^" with it just matches the beginning of line for the
first alternative in diff-file-junk-re.
* lisp/vc/ediff-ptch.el (ediff-map-patch-buffer): Concat "^" with
diff-file-junk-re wrapped in a shy group.

lisp/vc/ediff-ptch.el

index 0340672da2fbeb7e88176c3ca7650db0b574a45e..6c8e925d2b9f88c30ec129bc25e8040b83c0cbcf 100644 (file)
@@ -229,7 +229,7 @@ program."
                          "/dev/null")))
             ;; Remove file junk (Bug#26084).
             (while (re-search-backward
-                    (concat "^" diff-file-junk-re) mark1-end t)
+                    (concat "^\\(?:" diff-file-junk-re "\\)") mark1-end t)
                 (move-marker mark2 (match-beginning 0)))
            (goto-char mark2-end)
            (if filenames