emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Enhancing cperl-mode (was: Re: Does Emacs need two Perl modes?)


From: Harald Jörg
Subject: Enhancing cperl-mode (was: Re: Does Emacs need two Perl modes?)
Date: Mon, 19 Jun 2023 14:34:39 +0000

Corwin Brust <corwin@bru.st> writes:

> I was thinking about this just yesterday while whipping up this rather
> naive patch for cperl (adding class/method/ADJUST and async/await):
> https://bpa.st/VPAW4

Nice!

Are you going to commit this?  I'm working on adapting cperl-mode to
Perl 5.38 as well, and unsurprisingly my patch looks very similar (but
isn't committed yet either).

> [...]
> My sense has been that perl-mode is wired up by default specifically
> because it's the less frills choice, and thus more likely to perform
> well on older and underpowered systems.

The performance was indeed a point of criticism when I started using
cperl-mode.  But that was in another century - I doubt that it is a
serious issue today.

But yes, perl-mode is less ambitious (e.g. it doesn't look into regular
expressions and doesn't offer code reformatting).  Its code is cleaner,
and it uses the "Simple Minded Indentation Engine", which in many cases
gets it right.

I guess that in some areas both Perl modes will converge (for example,
they are using the same test suite).  Once the tree-sitter grammar for
Perl is reasonably complete (it isn't today), both modes might want to
use that.  Also, I've been dreaming of adding support for Perl's syntax
extensions as minor modes which can be activated on top of perl-mode and
cperl-mode.
-- 
Cheers,
haj



reply via email to

[Prev in Thread] Current Thread [Next in Thread]