diff options
Diffstat (limited to 'lisp/vc')
| -rw-r--r-- | lisp/vc/diff-mode.el | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 26c64ce2ad3..0c023b0f7f4 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -575,19 +575,21 @@ next hunk if TRY-HARDER is non-nil; otherwise signal an error." | |||
| 575 | (easy-mmode-define-navigation | 575 | (easy-mmode-define-navigation |
| 576 | diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view | 576 | diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view |
| 577 | (when diff-auto-refine-mode | 577 | (when diff-auto-refine-mode |
| 578 | (setq diff--auto-refine-data (cons (current-buffer) (point-marker))) | 578 | (unless (prog1 diff--auto-refine-data |
| 579 | (run-at-time 0.0 nil | 579 | (setq diff--auto-refine-data |
| 580 | (lambda () | 580 | (cons (current-buffer) (point-marker)))) |
| 581 | (when diff--auto-refine-data | 581 | (run-at-time 0.0 nil |
| 582 | (let ((buffer (car diff--auto-refine-data)) | 582 | (lambda () |
| 583 | (point (cdr diff--auto-refine-data))) | 583 | (when diff--auto-refine-data |
| 584 | (setq diff--auto-refine-data nil) | 584 | (let ((buffer (car diff--auto-refine-data)) |
| 585 | (with-local-quit | 585 | (point (cdr diff--auto-refine-data))) |
| 586 | (when (buffer-live-p buffer) | 586 | (setq diff--auto-refine-data nil) |
| 587 | (with-current-buffer buffer | 587 | (with-local-quit |
| 588 | (save-excursion | 588 | (when (buffer-live-p buffer) |
| 589 | (goto-char point) | 589 | (with-current-buffer buffer |
| 590 | (diff-refine-hunk))))))))))) | 590 | (save-excursion |
| 591 | (goto-char point) | ||
| 592 | (diff-refine-hunk)))))))))))) | ||
| 591 | 593 | ||
| 592 | (easy-mmode-define-navigation | 594 | (easy-mmode-define-navigation |
| 593 | diff-file diff-file-header-re "file" diff-end-of-file) | 595 | diff-file diff-file-header-re "file" diff-end-of-file) |