#1037544 emacs-common: CPerl mode: bad coloring when a comment block is used

Package:
emacs-common
Source:
emacs-common
Submitter:
Vincent Lefevre
Date:
2026-01-10 10:27:36 UTC
Severity:
normal
Tags:
#1037544#5
Date:
2023-06-13 22:19:58 UTC
From:
To:
When a comment block is used, i.e.

=begin comment

[code to comment]

=end comment

=cut

as described in the perlfaq7 man page, everything starting at the
"=begin comment" line is in the comment color, even the code after
the "=cut" line (which is no longer commented code).

#1037544#10
Date:
2023-06-14 01:37:59 UTC
From:
To:
Well, just after loading a file, coloring seem correct. But after
edition, it can quickly become incorrect.

To reproduce the bug:

1. Create a file with
---------------------------------------- #!/usr/bin/env perl foo; =begin comment bar; =end comment =cut print "OK\n"; ---------------------------------------- 2. Open it with "emacs -Q". 3. M-x cperl-mode 4. Go to the beginning of line "foo;". 5. C-k 6. Go to the beginning of line "bar;". 7. C-y At step 7, the color of the line print "OK\n"; changes to the comment color. This occurs whether the Emacs X11 interface is used or not.
#1037544#15
Date:
2023-06-14 02:09:30 UTC
From:
To:
This bug is still reproducible with cperl-mode.el from the Git master
branch. So I've also reported it upstream.

#1037544#26
Date:
2026-01-10 10:09:17 UTC
From:
To:
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie
Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran,
Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun.

Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie
für weitere Details.

#1037544#31
Date:
2026-01-10 10:09:17 UTC
From:
To:
Es gibt eine Familienspende in Höhe von 1.850.000,00 USD von Cheng Charlie
Saephan. Bitte antworten Sie für weitere Informationen. Denken Sie daran,
Ihrer Familie und den Bedürftigen in Ihrer Umgebung Gutes zu tun.

Dies ist bereits der zweite Versuch, Sie zu erreichen. Bitte antworten Sie
für weitere Details.