Subject: Re: bug#79258: [PATCH] Face-ify all comment delimiters in 'lua-ts-mode'

From: Eli Zaretskii <[email-masked]>
Date: Sat, 30 Aug 2025 11:32:36 +0300

> From: john muhl <[email-masked]>
> Cc: [email-masked]
> Date: Sat, 23 Aug 2025 11:32:48 -0500
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> From: john muhl <[email-masked]>
> >> 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.