Mercurial > emacs
comparison lisp/diff-mode.el @ 80099:f68e2df975f5
(diff-beginning-of-file-and-junk): If we're on the
Index: line, don't search backward for the previous one.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sun, 10 Feb 2008 16:36:07 +0000 |
parents | 8ac943071f87 |
children | 533d83b5f687 |
comparison
equal
deleted
inserted
replaced
80098:c2981640cb2c | 80099:f68e2df975f5 |
---|---|
487 ;; Presumably, we started before the file header, in the leading junk. | 487 ;; Presumably, we started before the file header, in the leading junk. |
488 (setq err file) | 488 (setq err file) |
489 (diff-file-next) | 489 (diff-file-next) |
490 (setq file (point))) | 490 (setq file (point))) |
491 (let ((index (save-excursion | 491 (let ((index (save-excursion |
492 (forward-line 1) ;In case we're looking at "Index:". | |
492 (re-search-backward "^Index: " prevhunk t)))) | 493 (re-search-backward "^Index: " prevhunk t)))) |
493 (when index (setq file index)) | 494 (when index (setq file index)) |
494 (if (<= file start) | 495 (if (<= file start) |
495 (goto-char file) | 496 (goto-char file) |
496 ;; File starts *after* the starting point: we really weren't in | 497 ;; File starts *after* the starting point: we really weren't in |