[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulat
From: |
Noam Postavsky |
Subject: |
Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation |
Date: |
Tue, 29 Nov 2016 19:03:40 -0500 |
On Tue, Nov 29, 2016 at 7:07 AM, Tino Calancha <address@hidden> wrote:
>
>
> @@ -1959,8 +2064,8 @@ diff-refine-hunk
> (interactive)
> (require 'smerge-mode)
> (save-excursion
> - (diff-beginning-of-hunk t)
> - (let* ((start (point))
> + (let* ((hunk-bounds (diff-bounds-of-hunk))
> + (start (goto-char (car hunk-bounds)))
> (style (diff-hunk-style)) ;Skips the hunk header as well.
> (beg (point))
> (props-c '((diff-mode . fine) (face diff-refine-changed)))
> @@ -1968,7 +2073,7 @@ diff-refine-hunk
> (props-a '((diff-mode . fine) (face diff-refine-added)))
> ;; 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))))
> + (end (goto-char (cadr hunk-bounds))))
>
> Hi Dima,
>
> after the patch variable start is not used. You might want to rename
> this var as _start, to avoid:
> diff-mode.el:2086:48:Warning: Unused lexical variable ‘start’
>
Ah, I probably should have caught that in review. I even had the
warning in my *compilation* buffer, I just didn't look. Fixed now.