From: "Harald Jörg" <haj@posteo.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Stefan Kangas <stefankangas@gmail.com>, 22867@debbugs.gnu.org
Subject: bug#22867: cperl-mode: Commit d0ad6306 suppresses fontification of hash/array declarations
Date: Fri, 4 Sep 2020 18:04:07 +0200 [thread overview]
Message-ID: <c38e47cd-9833-90de-e240-da4628957c61@posteo.de> (raw)
In-Reply-To: <87a6y6fblw.fsf@gnus.org>
On 9/4/20 5:46 AM, Lars Ingebrigtsen wrote:
> Harald Jörg <haj@posteo.de> writes:
>
>>> Is the fix worse than the problem? If yes, maybe it should be reverted?
>>
>> The fix isn't _worse_. Strings like "%s" and "%d" in the argument
>> list of printf being fontified as hashes is indeed idiotic. Also,
>> more than once I was annoyed by fontification in POD sections.
> [...]
> After poking around a bit, I came up with this patch:
>
> diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
> index 5dee5007e2..7a1c2e4d24 100644
> --- a/lisp/progmodes/cperl-mode.el
> +++ b/lisp/progmodes/cperl-mode.el
> @@ -5776,8 +5776,8 @@ cperl-init-faces
> t-font-lock-keywords)
> cperl-font-lock-keywords cperl-font-lock-keywords-1
> cperl-font-lock-keywords-2 (append
> - cperl-font-lock-keywords-1
> - t-font-lock-keywords-1)))
> + t-font-lock-keywords-1
> + cperl-font-lock-keywords-1)))
> (if (fboundp 'ps-print-buffer) (cperl-ps-print-init))
> (if (or (featurep 'choose-color) (featurep 'font-lock-extra))
> (eval ; Avoid a warning
>
>
> It seems to fix all the test cases in Harald's .pl file, and the cperl
> test file still passes (but its coverage isn't, ahem, extensive).
>
> Does anybody see any problems with just doing fixing it like this? I
> had a peek at a couple of other perl files here, and nothing immediately
> looked wonky, but I'm a bit out of practice writing perl...
That change is fine with me!
--
Cheers,
haj
next prev parent reply other threads:[~2020-09-04 16:04 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c38e47cd-9833-90de-e240-da4628957c61@posteo.de \
--to=haj@posteo.de \
--cc=22867@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=stefankangas@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.