GNU bug report logs -
#66161
30.0.50; cperl-mode bug in fontification after __END__
Previous Next
Reported by: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Fri, 22 Sep 2023 22:50:01 UTC
Severity: minor
Found in version 30.0.50
Done: Harald Jörg <haj <at> posteo.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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
This bug report was last modified 1 year and 220 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.