emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/ediff-ptch.el,v


From: Michael Kifer
Subject: [Emacs-diffs] Changes to emacs/lisp/ediff-ptch.el,v
Date: Tue, 12 Jun 2007 19:20:27 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Michael Kifer <kifer>   07/06/12 19:20:26

Index: ediff-ptch.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ediff-ptch.el,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- ediff-ptch.el       21 Jan 2007 03:53:11 -0000      1.32
+++ ediff-ptch.el       12 Jun 2007 19:20:24 -0000      1.33
@@ -136,10 +136,10 @@
 
 (defcustom ediff-context-diff-label-regexp
   (concat "\\("        ; context diff 2-liner
-         "^\\*\\*\\* \\([^ \t]+\\)[^*]+[\t ]*\n--- \\([^ \t]+\\)"
+         "^\\*\\*\\* \\([^\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.
 You probably don't want to change that, unless you are using an obscure patch
 program."
@@ -231,7 +231,7 @@
            ;; 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)
+           ;;     (filename-from-1st-header-line . filename-from-2nd-line)
            (setq possible-file-names
                  (cons (if (and beg1 end1)
                            (buffer-substring beg1 end1)
@@ -309,12 +309,13 @@
                ;; these dirs lead to the actual files starting at the present
                ;; directory. So, we don't strip these relative dirs from the
                ;; file names. This is a heuristic intended to improve guessing
+               (let ((default-directory (file-name-directory filename)))
                (unless (or (file-name-absolute-p base-dir1)
                            (file-name-absolute-p base-dir2)
                            (not (file-exists-p base-dir1))
                            (not (file-exists-p base-dir2)))
                  (setq base-dir1 ""
-                       base-dir2 ""))
+                         base-dir2 "")))
                (or (string= (car proposed-file-names) "/dev/null")
                    (setcar proposed-file-names
                            (ediff-file-name-sans-prefix




reply via email to

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