From: jm--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 67152@debbugs.gnu.org
Subject: bug#67152: [PATCH] Fix flymake integration in lua-ts-mode
Date: Mon, 13 Nov 2023 22:40:36 +0000 [thread overview]
Message-ID: <e194abe5fb786c3970823fd238fa4dcc3dea6638@pub.pink> (raw)
In-Reply-To: <handler.67152.B.169991476321361.ack@debbugs.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-flymake-integration-in-lua-ts-mode-Bug-67152.patch --]
[-- Type: text/x-diff; name="0001-Fix-flymake-integration-in-lua-ts-mode-Bug-67152.patch", Size: 2087 bytes --]
From ab3ecedb9e4ed4818603249e774dd8a1e6dae28b Mon Sep 17 00:00:00 2001
From: john muhl <jm@pub.pink>
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
next prev parent reply other threads:[~2023-11-13 22:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <handler.67152.B.169991476321361.ack@debbugs.gnu.org>
2023-11-13 22:31 ` bug#67152: [PATCH] Fix flymake integration in lua-ts-mode jm--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-13 22:40 ` jm--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-11-14 14:13 ` Eli Zaretskii
2023-11-14 14:23 ` João Távora
2023-11-14 14:26 ` João Távora
2023-11-14 14:37 ` Eli Zaretskii
2023-11-14 18:08 ` jm--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-15 0:09 ` jm--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-15 12:24 ` João Távora
2023-11-15 13:02 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e194abe5fb786c3970823fd238fa4dcc3dea6638@pub.pink \
--to=bug-gnu-emacs@gnu.org \
--cc=67152@debbugs.gnu.org \
--cc=jm@pub.pink \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).