all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation
@ 2016-11-29 12:07 Tino Calancha
  2016-11-30  0:03 ` Noam Postavsky
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Tino Calancha @ 2016-11-29 12:07 UTC (permalink / raw)
  To: Dima Kogan; +Cc: tino.calancha, emacs-devel



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



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-01-06  2:58 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-29 12:07 [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation Tino Calancha
2016-11-30  0:03 ` Noam Postavsky
2016-11-30 14:22 ` Dmitry Gutov
2016-11-30 14:31   ` Stefan Monnier
2016-11-30 14:34     ` Dmitry Gutov
2016-11-30 15:07       ` Stefan Monnier
2016-12-10  1:27   ` Dima Kogan
2016-12-10 10:14     ` Dmitry Gutov
2016-12-10 17:27       ` Dima Kogan
2016-12-11 11:07         ` Dmitry Gutov
2016-12-12  7:28           ` Dima Kogan
2016-12-16  1:05             ` Dmitry Gutov
2016-12-20  2:22             ` Tino Calancha
2016-12-20  7:31               ` Dima Kogan
2016-12-25  6:52               ` Dima Kogan
2016-12-25  9:48                 ` Tino Calancha
2016-12-25  9:58                   ` Tino Calancha
2016-12-25 14:10                     ` Dmitry Gutov
2016-12-06  2:03 ` Mark Oteiza
2016-12-07  7:29   ` Dima Kogan
2017-01-06  2:58     ` Mark Oteiza
2017-01-06  2:58     ` bug#25105: " Mark Oteiza
2016-12-07  7:29   ` Dima Kogan

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.