GNU bug report logs - #67152
[PATCH] Fix flymake integration in lua-ts-mode

Previous Next

Package: emacs;

Reported by: jm <at> pub.pink

Date: Mon, 13 Nov 2023 22:33:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 67152 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: jm <at> pub.pink, João Távora <joaotavora <at> gmail.com>
Cc: 67152 <at> debbugs.gnu.org
Subject: Re: bug#67152: [PATCH] Fix flymake integration in lua-ts-mode
Date: Tue, 14 Nov 2023 16:13:29 +0200
> 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" <bug-gnu-emacs <at> gnu.org>

João, is this OK?

> From ab3ecedb9e4ed4818603249e774dd8a1e6dae28b Mon Sep 17 00:00:00 2001
> From: john muhl <jm <at> 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
> 




This bug report was last modified 1 year and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.