[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22867: cperl mode highlights %d, but misses %.6f
From: |
Lars Ingebrigtsen |
Subject: |
bug#22867: cperl mode highlights %d, but misses %.6f |
Date: |
Fri, 07 Aug 2020 12:09:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
> cperl mode highlights %d, but misses %.6f in
> printf "%.6f,%.6f,%d\n" ...
That font locking is actually a bug:
("\\(\\([@%]\\|\\$#\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)" 1
(if (eq (char-after (match-beginning 2)) ?%)
'cperl-hash-face
'cperl-array-face)
t) ; arrays and hashes
It's interpreting this as a hash called %d... but we're inside a
string, so it's not a hash.
At this point, the string has already been fontised... So how do we
avoid doing this stuff if we're in a string? Cc'd Stefan for
expertise. :-)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#22867: cperl mode highlights %d, but misses %.6f,
Lars Ingebrigtsen <=