From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation Date: Tue, 29 Nov 2016 19:03:40 -0500 Message-ID: References: <874m2q1oca.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1480464284 26619 195.159.176.226 (30 Nov 2016 00:04:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2016 00:04:44 +0000 (UTC) Cc: Emacs developers , Dima Kogan To: Tino Calancha Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 30 01:04:40 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBsO7-0005it-PL for ged-emacs-devel@m.gmane.org; Wed, 30 Nov 2016 01:04:40 +0100 Original-Received: from localhost ([::1]:39827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBsO8-0001qH-KQ for ged-emacs-devel@m.gmane.org; Tue, 29 Nov 2016 19:04:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBsNE-0001q6-LW for emacs-devel@gnu.org; Tue, 29 Nov 2016 19:03:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBsND-0001i2-LX for emacs-devel@gnu.org; Tue, 29 Nov 2016 19:03:44 -0500 Original-Received: from mail-oi0-x244.google.com ([2607:f8b0:4003:c06::244]:35316) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cBsND-0001hj-DF for emacs-devel@gnu.org; Tue, 29 Nov 2016 19:03:43 -0500 Original-Received: by mail-oi0-x244.google.com with SMTP id v84so20690241oie.2 for ; Tue, 29 Nov 2016 16:03:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=ZVqV6G/D0YP5Lwyr1HzKxSCpYm5PsWddCRLSimC+sxQ=; b=xOd6YyDMKfipiClagKjbld/02NljysgJtM8d0G1kNZbrAg7lcPyN2tmmPppCAr/ju2 lNHZpUFgglkJkdMqLyhgd9r+ScvtmlTMJ54xZyPgL8ujR7jORGpm33TJ2sGWLFr+jbUl Oy78J6W8ESvpUVSC32FDZ6JIBxkuOhpYHI7rkH9uLjXVVGf1vr6Ic0qKDbzoPy8oNBFb rJBUkWLgAgTad+9AhFOqIi0cslCz5dpEZ3571hOb3OZrSF7x4y/j8Wjh99n7cDsEHI51 IMG93u2bLHROgma8VhM9zDXZWMoKVpvGnow9GQ6Mu7kr4IxND9tTGMUSkZVMRGzSDfJ9 wyEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=ZVqV6G/D0YP5Lwyr1HzKxSCpYm5PsWddCRLSimC+sxQ=; b=RZr0V1oCNz7L5u2euXIB5MhtEojXrgUKMCrmn4sgbjZiRQGq8uvUaPZnJj9R1ipf6s 2ABDInCiWLLa3jXfP1KNPKyK3I9kpJeob8HnBSbjKszDsXPXUpeHjrXEuc6w6QGnVlEU 68RUAsqMH3mBlxlM0eiYObEMSRqO2SLEIZ60vREWm74zEhIcBF30Hi10SDdjzhS2Nw6Q G0EivaXy8C/7rpHNquGOvDv4SwLarPA6Mq3LRLfxB1TysI9N8LBDr8Eyf4hm2tb9P13L SRiijbRlkhUGyBzm+shUd6nzZ370RmacSmOq/k3ktafUMnfv2QLvXQxUBiX7NKb+xksz MtgA== X-Gm-Message-State: AKaTC03qpTsHDYQDoNbBGv+plRrJX8ganFOQ57/veHjm4bxipEzz+EKaaHBewe/VvREaTFX1/WxbVDZ4c/HcGw== X-Received: by 10.202.77.194 with SMTP id a185mr16927115oib.26.1480464221073; Tue, 29 Nov 2016 16:03:41 -0800 (PST) Original-Received: by 10.157.6.234 with HTTP; Tue, 29 Nov 2016 16:03:40 -0800 (PST) In-Reply-To: <874m2q1oca.fsf@gmail.com> X-Google-Sender-Auth: T23TBpw0DSU8pUWT7ubKg1Jfvns X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::244 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209781 Archived-At: On Tue, Nov 29, 2016 at 7:07 AM, Tino Calancha wr= ote: > > > @@ -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 =E2=80=98start=E2= =80=99 > 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.