bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29193: 26.0.90; Using (thing-at-point 'sexp) in flymake-diag-region


From: Dmitry Gutov
Subject: bug#29193: 26.0.90; Using (thing-at-point 'sexp) in flymake-diag-region might be suboptimal
Date: Sun, 13 Dec 2020 01:56:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 12.12.2020 13:39, Lars Ingebrigtsen wrote:
Dmitry Gutov <dgutov@yandex.ru> writes:

Rubocop can report warning when 'end' is at wrong column. It just
reports the beginning column, of course.

In ruby-mode, (thing-at-point 'sexp) signals an error at this position.
I'm not sure exactly whether it's a problem in ruby-mode.

But Flycheck uses (thing-at-poing 'symbol) for the same purpose, and the
whole 'end' token gets highlighted (which is probably what we expect).

In contrast, Flymake only highlights its first character ('e').

I had a look at the current `flymake-diag-region', and it does not use
(thing-at-point 'sexp) at present.  It does use (end-of-thing 'sexp),
though.

The behavior is the same: when 'end' is misindented, only 'e' in 'end' is highlighted.

Whereas the message is:

Layout/EndAlignment: ‘end‘ at 23, 3 is not aligned with ‘class‘ at 5, 4.

That highlighting is not too hard to interpret, but we could do better, probably.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]