GNU bug report logs -
#67390
28; shorthands-font-lock-shorthands assumes shorthand uses same separator
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
João Távora <joaotavora <at> gmail.com> writes:
> On Fri, Nov 24, 2023 at 9:51 PM Jonas Bernoulli <jonas <at> bernoul.li> wrote:
>
>> Also, have you considered throwing in a
>> (not (string-equal (match-string 1) sname))
>>
>> to avoid having to call `shorthands--mismatch-from-end' at all?
>
> Where and how this be thrown in? How would you know what to highlight
> in the shorthand printed form? There can be many shorthand prefixes
> in a given file. But do show some code.
Please see the attached patch, inspired by Jonas's comment.
>> Maybe you have, but concluded it is cheaper to do a bit too much work
>> for non-shorthands, than to effectively repeat some work for shorthands.
>
> Maybe. Not sure this is more work (string-equal must still compare
> every character right?), but, in summary, I'm not married to this
> implementation. I somewhat appreciate that I could still read it
> after not having looked at it for a couple years, but feel free to
> change it.
I haven't done any benchmarking - I'm curious to learn how to benchmark
font lock though!
Thanks!!
Joseph
[0001-Support-shorthand-prefixes-besides.patch (text/x-diff, attachment)]
This bug report was last modified 1 year and 24 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.