cperl-mode
cperl-mode copied to clipboard
After package NAME BLOCK, the name of the surrounding package isn't restored
With the syntax package NAME BLOCK
packages can be nested:
package Foo;
package Bar {
# This namespace 'Bar', correctly identified
}
# This is now namespace 'Foo' again. But for the index it
# continues to be namespace 'Bar'.
I think we can live with that flaw - and I don't have an idea how to fix this.
The new syntax only changed the order of the elements, it had been possible to write
package Foo;
{ package Bar;
# Namespace Bar
}
# Back to namespace Foo.
I should mention: This has been fixed in the Emacs repository in February 2021 (available here in the "upstream" branch) but not in the master branch here.