diff options
| author | Stefan Monnier | 2010-12-07 14:48:15 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2010-12-07 14:48:15 -0500 |
| commit | b1816a74de23a28f4ab3f39d7bcedb81cc13fd13 (patch) | |
| tree | d80fd8002aba0feb71ce40065d13660caf3cfe0c | |
| parent | 5dcb4c4e5d757099766f7147eace43f0b00c7fe4 (diff) | |
| download | emacs-b1816a74de23a28f4ab3f39d7bcedb81cc13fd13.tar.gz emacs-b1816a74de23a28f4ab3f39d7bcedb81cc13fd13.zip | |
* diff-mode.el (diff-refine-hunk): Make it work when the hunk contains
empty lines without a leading space.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/diff-mode.el | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e16bcdaabcc..94f0bc96277 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-12-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains | ||
| 4 | empty lines without a leading space. | ||
| 5 | |||
| 1 | 2010-12-06 Leo <sdl.web@gmail.com> | 6 | 2010-12-06 Leo <sdl.web@gmail.com> |
| 2 | 7 | ||
| 3 | * dired-aux.el (dired-do-redisplay): Postphone | 8 | * dired-aux.el (dired-do-redisplay): Postphone |
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 907bf7d5b83..017d1b21b5a 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el | |||
| @@ -1827,10 +1827,13 @@ For use in `add-log-current-defun-function'." | |||
| 1827 | (eval-and-compile (require 'smerge-mode)) | 1827 | (eval-and-compile (require 'smerge-mode)) |
| 1828 | (save-excursion | 1828 | (save-excursion |
| 1829 | (diff-beginning-of-hunk 'try-harder) | 1829 | (diff-beginning-of-hunk 'try-harder) |
| 1830 | (let* ((style (diff-hunk-style)) ;Skips the hunk header as well. | 1830 | (let* ((start (point)) |
| 1831 | (style (diff-hunk-style)) ;Skips the hunk header as well. | ||
| 1831 | (beg (point)) | 1832 | (beg (point)) |
| 1832 | (props '((diff-mode . fine) (face diff-refine-change))) | 1833 | (props '((diff-mode . fine) (face diff-refine-change))) |
| 1833 | (end (progn (diff-end-of-hunk) (point)))) | 1834 | ;; Be careful to go back to `start' so diff-end-of-hunk gets |
| 1835 | ;; to read the hunk header's line info. | ||
| 1836 | (end (progn (goto-char start) (diff-end-of-hunk) (point)))) | ||
| 1834 | 1837 | ||
| 1835 | (remove-overlays beg end 'diff-mode 'fine) | 1838 | (remove-overlays beg end 'diff-mode 'fine) |
| 1836 | 1839 | ||