From: Stefan Monnier Date: Wed, 13 Oct 1999 22:26:45 +0000 (+0000) Subject: (diff-find-file-name): use `Index:' preferentially. X-Git-Tag: emacs-pretest-21.0.90~6450 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=83b7b03b127f9ed40efe5a8e94ed88d7ab058ad5;p=emacs.git (diff-find-file-name): use `Index:' preferentially. --- diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 7262b6b54f0..852737742dd 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -365,14 +365,16 @@ Non-nil OLD means that we want the old file." (condition-case () (progn (diff-prev-hunk) (point)) (error (point-min))))) + (header-files + (if (looking-at "[-*][-*][-*] \\(\\S-+\\)\\s-.*\n[-+][-+][-+] \\(\\S-+\\)\\s-.*$") + (list (if old (match-string 1) (match-string 2)) + (if old (match-string 2) (match-string 1))) + (forward-line 1) nil)) (fs (append - (when (looking-at "[-*][-*][-*] \\(\\S-+\\)\\s-.*\n[-+][-+][-+] \\(\\S-+\\)\\s-.*$") - (list (if old (match-string 1) (match-string 2)) - (if old (match-string 2) (match-string 1)))) - (progn (forward-line 1) nil) (when (save-excursion (re-search-backward "^Index: \\(.+\\)" limit t)) (list (match-string 1))) + header-files (when (re-search-backward "^diff \\(-\\S-+ +\\)*\\(\\S-+\\)\\( +\\(\\S-+\\)\\)?" nil t) (list (if old (match-string 2) (match-string 4)) (if old (match-string 4) (match-string 2))))))