]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix flymake integration in lua-ts-mode (Bug#67152)
authorjohn muhl <jm@pub.pink>
Mon, 13 Nov 2023 22:06:07 +0000 (16:06 -0600)
committerEli Zaretskii <eliz@gnu.org>
Wed, 15 Nov 2023 13:00:59 +0000 (15:00 +0200)
* lisp/progmodes/lua-ts-mode.el (lua-ts-flymake-luacheck): Use
'flymake-diag-region' to mark highlighted region.

lisp/progmodes/lua-ts-mode.el

index 2193779b759f634b7af9fa98653d86cb4c4eba50..4856888344ca972de1c665e0474d2e2bc30b57b9 100644 (file)
@@ -506,17 +506,18 @@ Calls REPORT-FN directly."
                                             (group (0+ nonl))
                                             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