summaryrefslogtreecommitdiff
path: root/lisp/ediff-ptch.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-09-11 23:29:09 +0000
committerRichard M. Stallman <rms@gnu.org>1996-09-11 23:29:09 +0000
commitc1d3fb9f3539ed6cc6369b02e235b7003edde2fd (patch)
tree2aded9693f92342ed03fb0023b54d538c8c73575 /lisp/ediff-ptch.el
parent34b1013b6058d56b3cf80f7e9d5c5efcd560165e (diff)
downloademacs-c1d3fb9f3539ed6cc6369b02e235b7003edde2fd.tar.gz
(ediff-context-diff-label-regexp): Recognize -u format better.
(ediff-map-patch-buffer): Recognize -u format better.
Diffstat (limited to 'lisp/ediff-ptch.el')
-rw-r--r--lisp/ediff-ptch.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/ediff-ptch.el b/lisp/ediff-ptch.el
index a06c861e3a6..bd74071388c 100644
--- a/lisp/ediff-ptch.el
+++ b/lisp/ediff-ptch.el
@@ -41,7 +41,7 @@
(concat "\\(" ; context diff 2-liner
"^\\*\\*\\* \\([^ \t]+\\)[^*]+[\t ]*\n--- \\([^ \t]+\\)"
"\\|" ; GNU unified format diff 2-liner
- "^--- \\([^ \t]+\\)[^-]+[\t ]*\n\\+\\+\\+ \\([^ \t]+\\)"
+ "^--- \\([^ \t]+\\)[\t ]+.*\n\\+\\+\\+ \\([^ \t]+\\)"
"\\)")
"*Regexp matching filename 2-liners at the start of each context diff.")
@@ -112,10 +112,10 @@
(forward-char 1) ; ensure progress towards the end
(setq mark2 (move-marker (make-marker) (match-beginning 0))
mark2-end (match-end 0)
- beg1 (match-beginning 2)
- end1 (match-end 2)
- beg2 (match-beginning 3)
- end2 (match-end 3))
+ beg1 (or (match-beginning 2) (match-beginning 4))
+ end1 (or (match-end 2) (match-end 4))
+ beg2 (or (match-beginning 3) (match-beginning 5))
+ end2 (or (match-end 3) (match-end 5)))
;; possible-file-names is holding the new file names until we
;; insert the old file name in the patch map
;; It is a pair (filename from 1st header line . fn from 2nd line)