emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation


From: Tino Calancha
Subject: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation
Date: Tue, 29 Nov 2016 21:07:33 +0900


@@ -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’



reply via email to

[Prev in Thread] Current Thread [Next in Thread]