Subject: Re: bug#78396: [PATCH] Add option for not highlight parens inside comments or strings.

From: Eli Zaretskii <[email-masked]>
Date: Sat, 31 May 2025 14:48:00 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: Elijah Gabe Pérez <[email-masked]>,
>   [email-masked]
> Date: Tue, 27 May 2025 17:02:20 -0400
> 
> Ideally, we'd want to match closing-parens-in-comments with
> opening-parens-in-comments.  But yes, it's good to refrain from giving
> the above bogus highlighting.
> 
> >> I've made an option for disable/control this behavior, by default its
> >> disabled but I wonder if this should be activated instead.
> > I'm worried by using syntax-ppss-context here: couldn't it sometimes
> > significantly slow down the highlighting of parens?  Stefan, WDYT?
> 
> `syntax-ppss` is not cheap, but here it's not used inside a loop and
> should be called only once per user-interaction so I'm not worried.
> I see there are two calls, tho, so I'd try to consolidate them so we call
> it at most once.

Thanks.

Elijah, would you like to update your patch as suggested by Stefan
above?