From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67152: [PATCH] Fix flymake integration in lua-ts-mode Date: Tue, 14 Nov 2023 16:13:29 +0200 Message-ID: <83wmuks9rq.fsf@gnu.org> References: <583004a793d54e48e65df38209bace3b6932c98b@pub.pink> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35605"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67152@debbugs.gnu.org To: jm@pub.pink, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 14 15:14:34 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r2uBS-0008li-5Q for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Nov 2023 15:14:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2uBK-00024w-7a; Tue, 14 Nov 2023 09:14:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2uBI-00024V-IV for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 09:14:20 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uBI-0002s7-AH for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 09:14:20 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r2uBy-0005kT-Df for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 09:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Nov 2023 14:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67152-submit@debbugs.gnu.org id=B67152.169997128122055 (code B ref 67152); Tue, 14 Nov 2023 14:15:02 +0000 Original-Received: (at 67152) by debbugs.gnu.org; 14 Nov 2023 14:14:41 +0000 Original-Received: from localhost ([127.0.0.1]:60630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2uBd-0005je-EX for submit@debbugs.gnu.org; Tue, 14 Nov 2023 09:14:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2uBc-0005jR-2u for 67152@debbugs.gnu.org; Tue, 14 Nov 2023 09:14:40 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2uAo-0002np-C2; Tue, 14 Nov 2023 09:13:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=dV3VUwVlVF7YK0J5bwqG/pAjfBEevuu8YiNPUA7OxQw=; b=H+qSsztXBfEnkC/gec3L nGEfpCMg6uyrVTuH/UWor/53SSfNYoWLi8H2aOQT1OJ93alHDIko03QXyUfIOfsD+Ikjih/icwN6I s5Z2RZugBfv7veBqDpKnARZ+yJeLEAgVxob05aVOwLJZq9kTS+wvIMxl2KVfSh04gX3V36+L/ZMXG 4N7ZZDdmXZXI9iixyQulXaSoDzJ41U80hpih6p/cWYO6Y7DAOXflvN/uDf1g+PjmpLM4Dnd9G6Yua zSsxUVVHYYctlmN/HsZmof1zSTK8Pbs7yHGsZXdYHZnTTzHvwlrFQlmQ80oCr0Kc+8zJsbLsWt0oJ W9wvSY4QAd2R3Q==; In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274316 Archived-At: > Date: Mon, 13 Nov 2023 22:40:36 +0000 > TLS-Required: No > From: jm--- via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" João, is this OK? > From ab3ecedb9e4ed4818603249e774dd8a1e6dae28b Mon Sep 17 00:00:00 2001 > From: john muhl > Date: Mon, 13 Nov 2023 16:06:07 -0600 > Subject: [PATCH] Fix flymake integration in lua-ts-mode (Bug#67152) > > * lisp/progmodes/lua-ts-mode.el (lua-ts-flymake-luacheck): Use > flymake-diag-region to mark highlighted region. > --- > lisp/progmodes/lua-ts-mode.el | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el > index bb6d5cb8c91..ad753210dd4 100644 > --- a/lisp/progmodes/lua-ts-mode.el > +++ b/lisp/progmodes/lua-ts-mode.el > @@ -508,16 +508,18 @@ lua-ts-flymake-luacheck > eol)) > nil t) > for line = (string-to-number (match-string 1)) > - for beg = (string-to-number (match-string 2)) > - for end = (string-to-number (match-string 3)) > + for (beg . end) = (flymake-diag-region > + source > + (string-to-number (match-string 1)) > + (string-to-number (match-string 2))) > for msg = (match-string 4) > for type = (if (string-match "^(W" msg) > :warning > :error) > when (and beg end) > collect (flymake-make-diagnostic source > - (cons line beg) > - (cons line (1+ end)) > + beg > + end > type > msg) > into diags > -- > 2.41.0 >