GNU bug report logs -
#79258
[PATCH] Face-ify all comment delimiters in 'lua-ts-mode'
Previous Next
Reported by: john muhl <jm <at> pub.pink>
Date: Sat, 16 Aug 2025 20:45:01 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
To reply to this bug, email your comments to 79258 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79258
; Package
emacs
.
(Sat, 16 Aug 2025 20:45:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
john muhl <jm <at> pub.pink>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 16 Aug 2025 20:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
Add font-lock-comment-delimiter face to all the initial dashes in single
line comments. Some popular documentation styles recommend triple dashes
and it looks better to have all the dashes in the same face.
[0001-Face-ify-all-comment-delimiters-in-lua-ts-mode.patch (text/patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79258
; Package
emacs
.
(Sat, 23 Aug 2025 12:01:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 79258 <at> debbugs.gnu.org (full text, mbox):
> From: john muhl <jm <at> pub.pink>
> Date: Sat, 16 Aug 2025 15:43:56 -0500
>
> Add font-lock-comment-delimiter face to all the initial dashes in single
> line comments. Some popular documentation styles recommend triple dashes
> and it looks better to have all the dashes in the same face.
Thanks, but shouldn't the code which moves point be in save-excursion
in this case? If not, why not?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#79258
; Package
emacs
.
(Sat, 23 Aug 2025 16:34:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 79258 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: john muhl <jm <at> pub.pink>
>> Date: Sat, 16 Aug 2025 15:43:56 -0500
>>
>> Add font-lock-comment-delimiter face to all the initial dashes in single
>> line comments. Some popular documentation styles recommend triple dashes
>> and it looks better to have all the dashes in the same face.
>
> Thanks, but shouldn't the code which moves point be in save-excursion
> in this case? If not, why not?
I thought the font-lock machinery took care of it. If I followed
the code correctly then we eventually end up in
font-lock-default-fontify-syntactically which uses save-excursion.
Checking the position of point at the beginning of
lua-ts--comment-font-lock shows that it has already been moved (to
the end of the line/comment) before there is any chance to call
save-excursion from here so the position it would restore isn’t
where the user has the point at anyway.
[0001-Fontify-all-comment-delimiters-in-lua-ts-mode.patch (text/x-patch, attachment)]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 30 Aug 2025 08:33:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
john muhl <jm <at> pub.pink>
:
bug acknowledged by developer.
(Sat, 30 Aug 2025 08:33:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 79258-done <at> debbugs.gnu.org (full text, mbox):
> From: john muhl <jm <at> pub.pink>
> Cc: 79258 <at> debbugs.gnu.org
> Date: Sat, 23 Aug 2025 11:32:48 -0500
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> From: john muhl <jm <at> pub.pink>
> >> Date: Sat, 16 Aug 2025 15:43:56 -0500
> >>
> >> Add font-lock-comment-delimiter face to all the initial dashes in single
> >> line comments. Some popular documentation styles recommend triple dashes
> >> and it looks better to have all the dashes in the same face.
> >
> > Thanks, but shouldn't the code which moves point be in save-excursion
> > in this case? If not, why not?
>
> I thought the font-lock machinery took care of it. If I followed
> the code correctly then we eventually end up in
> font-lock-default-fontify-syntactically which uses save-excursion.
>
> Checking the position of point at the beginning of
> lua-ts--comment-font-lock shows that it has already been moved (to
> the end of the line/comment) before there is any chance to call
> save-excursion from here so the position it would restore isn’t
> where the user has the point at anyway.
Thanks, now installed on the master branch, and closing the bug.
This bug report was last modified 12 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.