Mercurial > emacs
comparison lisp/diff-mode.el @ 26009:16ee8d330c59
(diff-find-file-name): use `Index:' preferentially.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 13 Oct 1999 22:26:45 +0000 |
parents | e1d167cf6e96 |
children | 8b8438e9ac12 |
comparison
equal
deleted
inserted
replaced
26008:88c485e220ab | 26009:16ee8d330c59 |
---|---|
363 (re-search-forward diff-file-header-re nil t))) | 363 (re-search-forward diff-file-header-re nil t))) |
364 (let* ((limit (save-excursion | 364 (let* ((limit (save-excursion |
365 (condition-case () | 365 (condition-case () |
366 (progn (diff-prev-hunk) (point)) | 366 (progn (diff-prev-hunk) (point)) |
367 (error (point-min))))) | 367 (error (point-min))))) |
368 (header-files | |
369 (if (looking-at "[-*][-*][-*] \\(\\S-+\\)\\s-.*\n[-+][-+][-+] \\(\\S-+\\)\\s-.*$") | |
370 (list (if old (match-string 1) (match-string 2)) | |
371 (if old (match-string 2) (match-string 1))) | |
372 (forward-line 1) nil)) | |
368 (fs (append | 373 (fs (append |
369 (when (looking-at "[-*][-*][-*] \\(\\S-+\\)\\s-.*\n[-+][-+][-+] \\(\\S-+\\)\\s-.*$") | |
370 (list (if old (match-string 1) (match-string 2)) | |
371 (if old (match-string 2) (match-string 1)))) | |
372 (progn (forward-line 1) nil) | |
373 (when (save-excursion | 374 (when (save-excursion |
374 (re-search-backward "^Index: \\(.+\\)" limit t)) | 375 (re-search-backward "^Index: \\(.+\\)" limit t)) |
375 (list (match-string 1))) | 376 (list (match-string 1))) |
377 header-files | |
376 (when (re-search-backward "^diff \\(-\\S-+ +\\)*\\(\\S-+\\)\\( +\\(\\S-+\\)\\)?" nil t) | 378 (when (re-search-backward "^diff \\(-\\S-+ +\\)*\\(\\S-+\\)\\( +\\(\\S-+\\)\\)?" nil t) |
377 (list (if old (match-string 2) (match-string 4)) | 379 (list (if old (match-string 2) (match-string 4)) |
378 (if old (match-string 4) (match-string 2)))))) | 380 (if old (match-string 4) (match-string 2)))))) |
379 (fs (delq nil fs)) | 381 (fs (delq nil fs)) |
380 (file | 382 (file |