GNU bug report logs -
#78396
[PATCH] Add option for not highlight parens inside comments or strings.
Previous Next
Full log
Message #17 received at 78396 <at> debbugs.gnu.org (full text, mbox):
>> Sometimes show-paren will highlight the parens that are inside a
>> comment/string which looks annoying and somewhat confusing.
>>
>> e.g.
>> show-paren will highlight this paren:
>>
>> ;; :^)| <- cursor
>> ^ paren highlighted as mismatch
>>
>> or:
>> v
>> (
>> ;; )| <- cursor
>> ^ both parens highlighted
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.
Stefan
This bug report was last modified 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.