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: Harald Jörg <haj <at> posteo.de>
To: John Ciolfi <ciolfi <at> mathworks.com>
Cc: 76868 <at> debbugs.gnu.org, maurooaranda <at> gmail.com
Subject: bug#76868: 29.4; cperl-mode __END__ is incorrectly handled
Date: Mon, 10 Mar 2025 00:34:59 +0000
John Ciolfi <ciolfi <at> mathworks.com> writes:

> Thanks for the detailed response. I learned something new. To me it
> seems that perl isn't supplying enough information for cperl-mode to
> get the trailers correct. Ideally, we could definitively tell the type
> of content below the __END__ or __DATA__ keywords.  I suppose one
> could set file local variables to configure
> cperl-fontify-trailer. However, one needs to know about this option. I
> wonder if there's a way to make the option more obvious?

File local variables work but need caution.  Several tools might compete
with content for the first line, and a local variables list "near the
end of the file" might come unexpected to a program reading from the
DATA file handle.  Often it is "less intrusive" to use a .dir-locals.el
file.

> A small suggestion is to update the help text or cperl-fontify-trailer
> to indicate it also changes the indent behavior.  I think the name
> cperl-trailer-type is a good name too, though updating the help text
> may be sufficient.

Improving the docstring by including the behavior of indentation is
indeed a good idea!  I'll do that for the master branch.
-- 
Cheers,
haj




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.