GNU bug report logs - #22867
cperl mode highlights %d, but misses %.6f

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Tue, 1 Mar 2016 06:53:01 UTC

Severity: minor

Tags: fixed

Merged with 3091, 11054

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 22867 <at> debbugs.gnu.org
Subject: bug#22867: cperl mode highlights %d, but misses %.6f
Date: Fri, 07 Aug 2020 12:09:56 +0200
[Message part 1 (text/plain, inline)]
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> cperl mode highlights %d, but misses %.6f in
> printf "%.6f,%.6f,%d\n" ...

[Message part 2 (image/png, inline)]
[Message part 3 (text/plain, inline)]
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

This bug report was last modified 4 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.