unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 22867@debbugs.gnu.org
Subject: bug#22867: cperl mode highlights %d, but misses %.6f
Date: Fri, 07 Aug 2020 12:09:56 +0200	[thread overview]
Message-ID: <878seq6a2z.fsf@gnus.org> (raw)
In-Reply-To: <87ziui3d2f.fsf@jidanni.org> ("積丹尼 Dan Jacobson"'s message of "Tue, 01 Mar 2016 14:52:08 +0800")

[-- Attachment #1: Type: text/plain, Size: 137 bytes --]

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

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


[-- Attachment #2: Type: image/png, Size: 8309 bytes --]

[-- Attachment #3: Type: text/plain, Size: 571 bytes --]


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

  parent reply	other threads:[~2020-08-07 10:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01  6:52 bug#22867: cperl mode highlights %d, but misses %.6f 積丹尼 Dan Jacobson
2016-04-10 23:17 ` Alexis
2020-08-07 10:09 ` Lars Ingebrigtsen [this message]
2020-08-07 11:13   ` Andreas Schwab
2020-08-07 12:07     ` Lars Ingebrigtsen
2020-09-01 16:02 ` bug#22867: cperl-mode: Commit d0ad6306 suppresses fontification of hash/array declarations Harald Jörg
2020-09-01 16:34   ` Stefan Kangas
2020-09-01 19:44     ` Harald Jörg
2020-09-04  3:46       ` Lars Ingebrigtsen
2020-09-04 16:04         ` Harald Jörg
2020-09-05 12:37           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878seq6a2z.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=22867@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).