cperl-mode icon indicating copy to clipboard operation
cperl-mode copied to clipboard

After package NAME BLOCK, the name of the surrounding package isn't restored

Open HaraldJoerg opened this issue 4 years ago • 2 comments

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.

HaraldJoerg avatar Jun 19 '20 23:06 HaraldJoerg

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.

choroba avatar Jul 03 '20 13:07 choroba

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.

HaraldJoerg avatar Nov 17 '21 17:11 HaraldJoerg