summaryrefslogtreecommitdiff
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>1999-10-13 22:26:45 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>1999-10-13 22:26:45 +0000
commit7914d2a7d82dd8f1f935410c93ef39bf8b33f0e8 (patch)
tree99da609020027a2ba6bbf05e207ad6643853dd2c /lisp/diff-mode.el
parent66565ad250cd2642c1eee333a3e0fcd455ba0386 (diff)
downloademacs-7914d2a7d82dd8f1f935410c93ef39bf8b33f0e8.tar.gz
(diff-find-file-name): use `Index:' preferentially.
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el10
1 files changed, 6 insertions, 4 deletions
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))))))