emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 2c49705: ediff-context-diff-label-regexp: Detect th


From: Tino Calancha
Subject: [Emacs-diffs] master 2c49705: ediff-context-diff-label-regexp: Detect the end of second file
Date: Wed, 7 Dec 2016 12:10:01 +0000 (UTC)

branch: master
commit 2c4970560fbb0d1efe95f8a002c181bc706c1a13
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    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.
---
 lisp/vc/ediff-ptch.el |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el
index 6a07f80..6e8e947 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."
 ;; This context diff does not recognize spaces inside files, but removing ' '
 ;; from [^ \t] breaks normal patches for some reason
 (defcustom ediff-context-diff-label-regexp
-  (concat "\\("        ; context diff 2-liner
-         "^\\*\\*\\* +\\([^ \t]+\\)[^*]+[\t ]*\n--- +\\([^ \t]+\\)"
-         "\\|"         ; unified format diff 2-liner
-         "^--- +\\([^ \t]+\\).*\n\\+\\+\\+ +\\([^ \t]+\\)"
-         "\\)")
+  (let ((stuff "\\([^ \t\n]+\\)"))
+    (concat "\\("      ; context diff 2-liner
+            "^\\*\\*\\* +" stuff "[^*]+[\t ]*\n--- +" stuff
+            "\\|"      ; unified format diff 2-liner
+            "^--- +" stuff ".*\n\\+\\+\\+ +" stuff
+            "\\)"))
   "Regexp matching filename 2-liners at the start of each context diff.
 You probably don't want to change that, unless you are using an obscure patch
 program."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]