aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTino Calancha2016-12-07 21:07:45 +0900
committerTino Calancha2016-12-07 21:07:45 +0900
commit2c4970560fbb0d1efe95f8a002c181bc706c1a13 (patch)
treeb08859b899145b76100cd9932fd6d42586a1d7da
parent7b1e97f0e62e0be5c89708c4aef38c0d462d2291 (diff)
downloademacs-2c4970560fbb0d1efe95f8a002c181bc706c1a13.tar.gz
emacs-2c4970560fbb0d1efe95f8a002c181bc706c1a13.zip
ediff-context-diff-label-regexp: Detect the end of second file
* lisp/vc/ediff-ptch.el (ediff-context-diff-label-regexp): Skip '\n' in file names (Bug#25010). * test/lisp/vc/ediff-ptch-tests.el: New file. (ibuffer-test-bug25010): Add test for Bug#25010.
-rw-r--r--lisp/vc/ediff-ptch.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el
index 6a07f805334..6e8e9473fcc 100644
--- a/lisp/vc/ediff-ptch.el
+++ b/lisp/vc/ediff-ptch.el
@@ -120,11 +120,12 @@ patch. So, don't change these variables, unless the default doesn't work."
120;; This context diff does not recognize spaces inside files, but removing ' ' 120;; This context diff does not recognize spaces inside files, but removing ' '
121;; from [^ \t] breaks normal patches for some reason 121;; from [^ \t] breaks normal patches for some reason
122(defcustom ediff-context-diff-label-regexp 122(defcustom ediff-context-diff-label-regexp
123 (concat "\\(" ; context diff 2-liner 123 (let ((stuff "\\([^ \t\n]+\\)"))
124 "^\\*\\*\\* +\\([^ \t]+\\)[^*]+[\t ]*\n--- +\\([^ \t]+\\)" 124 (concat "\\(" ; context diff 2-liner
125 "\\|" ; unified format diff 2-liner 125 "^\\*\\*\\* +" stuff "[^*]+[\t ]*\n--- +" stuff
126 "^--- +\\([^ \t]+\\).*\n\\+\\+\\+ +\\([^ \t]+\\)" 126 "\\|" ; unified format diff 2-liner
127 "\\)") 127 "^--- +" stuff ".*\n\\+\\+\\+ +" stuff
128 "\\)"))
128 "Regexp matching filename 2-liners at the start of each context diff. 129 "Regexp matching filename 2-liners at the start of each context diff.
129You probably don't want to change that, unless you are using an obscure patch 130You probably don't want to change that, unless you are using an obscure patch
130program." 131program."