From: "Harald Jörg" <haj@posteo.de>
To: 66161@debbugs.gnu.org
Subject: bug#66161: cperl-mode: fontification after __END__
Date: Fri, 29 Sep 2023 16:12:31 +0000 [thread overview]
Message-ID: <871qehyn4g.fsf@oook.m.uunet.de> (raw)
In-Reply-To: <f1128181-0df9-1548-2b87-204b381c8e34@gmail.com>
CPerl mode fontifies Text after __END__ (and also after a __DATA__
token) like Perl - and I guess that this is intentional, supporting two
use cases of such text:
- The AutoSplit and SelfLoader modules (both available in the Perl
core) compile Perl sources written after these tokens only on demand
(when they're first called). For sources using these modules,
treating these texts as Perl code is useful. However, these days
both modules are rarely used in new code.
- The POD (Perl's documentation format) tools ignore the tokens, so
many authors put their documentation after an __END__ token to speed
up compilation.
For all other uses of the tokens (e.g. as a delimiter for end-of-file
comments), the fontification of CPerl mode looks messed up. So I agree
that finding a way to make these texts less "colorful" makes sense.
perl-mode treats text after these tokens as a "c-style comment". This
is elegant, but I would not want to apply this unconditionally to
cperl-mode: comments are excluded from imenu indexing, which cperl-mode
performs for both subroutines and POD headings.
--
Cheers,
haj
next prev parent reply other threads:[~2023-09-29 16:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 22:49 bug#66161: 30.0.50; cperl-mode bug in fontification after __END__ Mauro Aranda
2023-09-29 16:12 ` Harald Jörg [this message]
2023-10-14 18:37 ` bug#66161: cperl-mode: " Harald Jörg
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=871qehyn4g.fsf@oook.m.uunet.de \
--to=haj@posteo.de \
--cc=66161@debbugs.gnu.org \
/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.