From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#37395: [PATCH v4] diff-mode.el: take into account patch separators Date: Wed, 09 Oct 2019 23:08:16 +0300 Message-ID: <1570651696.135652.4@yandex.ru> References: <1568323985.28657.0@yandex.ru> <20191008193420.193239-1-Hi-Angel@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="95059"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37395@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 09 22:41:03 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iIIla-000OWP-Q9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2019 22:41:02 +0200 Original-Received: from localhost ([::1]:57376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIIlZ-0000Nz-3G for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2019 16:41:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60236) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIIGd-0000sW-VP for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 16:09:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIIGc-0002kY-N9 for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 16:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45355) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iIIGc-0002k6-9T for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 16:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iIIGc-0000ob-2j for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 16:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Oct 2019 20:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37395 X-GNU-PR-Package: emacs Original-Received: via spool by 37395-submit@debbugs.gnu.org id=B37395.15706517103093 (code B ref 37395); Wed, 09 Oct 2019 20:09:02 +0000 Original-Received: (at 37395) by debbugs.gnu.org; 9 Oct 2019 20:08:30 +0000 Original-Received: from localhost ([127.0.0.1]:54175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIIG6-0000np-0s for submit@debbugs.gnu.org; Wed, 09 Oct 2019 16:08:30 -0400 Original-Received: from forward104o.mail.yandex.net ([37.140.190.179]:52986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIIG2-0000nV-1A for 37395@debbugs.gnu.org; Wed, 09 Oct 2019 16:08:28 -0400 Original-Received: from forward103q.mail.yandex.net (forward103q.mail.yandex.net [IPv6:2a02:6b8:c0e:50:0:640:b21c:d009]) by forward104o.mail.yandex.net (Yandex) with ESMTP id 67CD994217E; Wed, 9 Oct 2019 23:08:18 +0300 (MSK) Original-Received: from mxback9q.mail.yandex.net (mxback9q.mail.yandex.net [IPv6:2a02:6b8:c0e:6b:0:640:b813:52e4]) by forward103q.mail.yandex.net (Yandex) with ESMTP id 6350361E0002; Wed, 9 Oct 2019 23:08:18 +0300 (MSK) Original-Received: from vla1-a59883171b53.qloud-c.yandex.net (vla1-a59883171b53.qloud-c.yandex.net [2a02:6b8:c0d:1a17:0:640:a598:8317]) by mxback9q.mail.yandex.net (nwsmtp/Yandex) with ESMTP id B6jtVNria3-8I2Su1GX; Wed, 09 Oct 2019 23:08:18 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1570651698; bh=2WvYN2O9xVL8KD65kPBJn6K+4osIVFTJVidDIvZXrc0=; h=In-Reply-To:Cc:To:Subject:From:References:Date:Message-Id; b=XfMtF9zcQs48RRft7Zizdaiv6R4p37ijYf+b7YZxnwKwbv/Lfiv3uHpaTEqoUz+Gu sqjAY1yvmlgXMLjKWjMYuCfqQfoLupu6n/XpTDR+jda6fmzBagEsim13w4S2sbdtK2 DiWcJ9oLsA5XTSCjLg/0CdEtJ3v11geRMt0hhmB4= Authentication-Results: mxback9q.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by vla1-a59883171b53.qloud-c.yandex.net (nwsmtp/Yandex) with ESMTPSA id 47H8NqrKGA-8HruCCPu; Wed, 09 Oct 2019 23:08:17 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) In-Reply-To: <87mue9678m.fsf@gnus.org> X-Mailer: geary/3.35.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:168777 Archived-At: Ah, sorry, I missed it. v5 sent, now should be no new warnings. On =F3=D2, =CF=CB=D4 9, 2019 at 21:36, Lars Ingebrigtsen =20 wrote: > Konstantin Kharlamov writes: >=20 >> * lisp/vc/diff-mode.el (diff-prev-line-if-patch-separator): >> A function to return prev. line if it has git-format-patch >> separator. >> (diff-end-of-hunk): Make use of >> diff-prev-line-if-patch-separator >> diff-buffer-type: whether a buffer is a git-diff >> (define-derived-mode): set diff-buffer-type to appropriate >> value >=20 > Byte-compiling gives: >=20 > In diff-prev-line-if-patch-separator: > vc/diff-mode.el:516:10:Warning: reference to free variable=20 > `diff-buffer-type' > vc/diff-mode.el:517:7:Warning: `previous-line' is for interactive use=20 > only; > use `forward-line' with negative argument instead. >=20 > So you have to move the defvar earlier and adjust the previous-line,=20 > but > otherwise I think it looks OK... >=20 > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no =