From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation Date: Tue, 29 Nov 2016 21:07:33 +0900 Message-ID: <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 1480421435 5992 195.159.176.226 (29 Nov 2016 12:10:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 Nov 2016 12:10:35 +0000 (UTC) Cc: tino.calancha@gmail.com, emacs-devel@gnu.org To: Dima Kogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 29 13:10:24 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 1cBhEq-0008CJ-Rm for ged-emacs-devel@m.gmane.org; Tue, 29 Nov 2016 13:10:20 +0100 Original-Received: from localhost ([::1]:36417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBhEu-0003vm-KF for ged-emacs-devel@m.gmane.org; Tue, 29 Nov 2016 07:10:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBhCM-0002om-4d for emacs-devel@gnu.org; Tue, 29 Nov 2016 07:07:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBhCG-0005Fz-Kb for emacs-devel@gnu.org; Tue, 29 Nov 2016 07:07:46 -0500 Original-Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:34252) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cBhCG-0005F6-CU for emacs-devel@gnu.org; Tue, 29 Nov 2016 07:07:40 -0500 Original-Received: by mail-pg0-x242.google.com with SMTP id e9so16227487pgc.1 for ; Tue, 29 Nov 2016 04:07:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OVvc0NS71PN8zuUpCcYhxLLxzu/BCLbQuk7OhnEgFSQ=; b=STCRdp3AZqxEGOM60XYYF3CBu5G1xfDL0hI1n1CXfhwBO31jd+hXxzjHyz+uB0BaKH o6U4q/0WQM8bXDrH27Hte72o/71PgBUmm2nRthhMExEvZykHnkQISriCFRgGsJ0fKJO3 fnt+OD57eMRDr1nW2Z8dbWUr0jdMdV0ixT65NBnhVTQ/19JcyrM5OFd0I6WXXC/H/l8R 4lMBN9iWxAqAdcg2DLABialkunthao1/xBfXWxMdWUOIuGwsUZlVhrH0m3Aq+tO9P3bL 2C1bp9DyMw231vJG583QJEjmp2CZ21ycODo6FGw1ZejnfTp1w+fkZk0d+8FUFzlHYBfc WA1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OVvc0NS71PN8zuUpCcYhxLLxzu/BCLbQuk7OhnEgFSQ=; b=SnvmWdVJGsHDMSO55YSESBIKSgQ8TSLVwpXM0Bro3RpC3Dg2ioVhjikfS9sZ8XJXx1 ClkAX8Z2tmC02ac3mqHwuv8Ysz/eyY16sILTtUAQQdwg0EF47dKVpcL2B4/U0WfA/xbs aIqdsyCJHUg8OW7BynBM0YDRADS+vqL5ishUQBsaBqSM6Y8p53KMOX2Hr1yEh096Qcne eIy3AHuNPrRxBaNhZV42mxr5znQWxEPdlp6lCD4b3oKWcnqxJo+eGKYjt5kGYKdH8BtO jc9ot5V/Vi8AXRaQ4XkH+tynt/Uwzf+Nj7Bi+8ePZZZ34Xzb0fxdiX8vnKViucnFs4qQ yhqQ== X-Gm-Message-State: AKaTC00OqX+xOa0OkO1l9acylWzpylLLwQ+IOo2EbcDbLKnZ8zuRRpGK7K69QBrgeBtq2Q== X-Received: by 10.84.216.20 with SMTP id m20mr61091318pli.126.1480421258623; Tue, 29 Nov 2016 04:07:38 -0800 (PST) Original-Received: from calancha-pc (177.192.218.133.dy.bbexcite.jp. [133.218.192.177]) by smtp.gmail.com with ESMTPSA id y15sm76956335pgc.43.2016.11.29.04.07.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Nov 2016 04:07:38 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c05::242 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:209728 Archived-At: @@ -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