[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100282: * diff-mode.el (diff-refi
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100282: * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains |
Date: |
Tue, 07 Dec 2010 14:48:15 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100282
committer: Stefan Monnier <address@hidden>
branch nick: emacs-23
timestamp: Tue 2010-12-07 14:48:15 -0500
message:
* diff-mode.el (diff-refine-hunk): Make it work when the hunk contains
empty lines without a leading space.
modified:
lisp/ChangeLog
lisp/diff-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-12-06 20:07:48 +0000
+++ b/lisp/ChangeLog 2010-12-07 19:48:15 +0000
@@ -1,3 +1,8 @@
+2010-12-07 Stefan Monnier <address@hidden>
+
+ * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains
+ empty lines without a leading space.
+
2010-12-06 Leo <address@hidden>
* dired-aux.el (dired-do-redisplay): Postphone
=== modified file 'lisp/diff-mode.el'
--- a/lisp/diff-mode.el 2010-11-01 03:13:42 +0000
+++ b/lisp/diff-mode.el 2010-12-07 19:48:15 +0000
@@ -1827,10 +1827,13 @@
(eval-and-compile (require 'smerge-mode))
(save-excursion
(diff-beginning-of-hunk 'try-harder)
- (let* ((style (diff-hunk-style)) ;Skips the hunk header as well.
+ (let* ((start (point))
+ (style (diff-hunk-style)) ;Skips the hunk header as well.
(beg (point))
(props '((diff-mode . fine) (face diff-refine-change)))
- (end (progn (diff-end-of-hunk) (point))))
+ ;; Be careful to go back to `start' so diff-end-of-hunk gets
+ ;; to read the hunk header's line info.
+ (end (progn (goto-char start) (diff-end-of-hunk) (point))))
(remove-overlays beg end 'diff-mode 'fine)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100282: * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains,
Stefan Monnier <=