GNU bug report logs - #76868
29.4; cperl-mode __END__ is incorrectly handled

Previous Next

Package: emacs;

Reported by: ciolfi <at> mathworks.com

Date: Sat, 8 Mar 2025 15:35:01 UTC

Severity: minor

Found in version 29.4

Full log


View this message in rfc822 format

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: ciolfi <at> mathworks.com, 76868 <at> debbugs.gnu.org
Subject: bug#76868: 29.4; cperl-mode __END__ is incorrectly handled
Date: Sat, 8 Mar 2025 12:51:16 -0300
On 8/3/25 12:34, John Ciolfi via Bug reports for GNU Emacs, the Swiss 
army knife of text editors wrote:
>
> Hi
>
> Given the following cperl-mode program, test.pl
>
>      # -*- mode: cperl; -*-
>      print "hello\n";
>      __END__
>      This is not
>        perl code!
>
> The lines after the __END__ are treated as perl code. They are 
syntactically colored and indented
> which is incorrect. In perl, __END__ defines the end of the Perl code 
in the file. Any text that
> appears after __END__ is ignored by the Perl compiler.
>
> All lines after __END__ should be treated as comments.
>

Any chance that the option cperl-fontify-trailer helps here?

I remember reporting something similar in:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66161





This bug report was last modified 102 days ago.

Previous Next


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