emacs-devel
[Top][All Lists]
Advanced

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

Re: Please do not deprecate perl-mode in favour of cperl-mode


From: Harald Jörg
Subject: Re: Please do not deprecate perl-mode in favour of cperl-mode
Date: Sun, 03 Dec 2023 10:10:12 +0000

Paul W. Rankin writes:

> I am writing in response to a mention I saw today on Mastodon, which
> appears supported by the EtherPad, that there is plan to deprecate
> Perl Mode in favour of C Perl Mode in Emacs.
>
> If this is true can I please urge a reconsideration?

A better description would be: deprecate perl-mode.el in favour of
cperl-mode.el.  It is not intended to make M-x perl-mode go away, but to
implement its look and feel with cperl-mode.el.

The main motivation for this that maintaining two modes to keep up with
changes in Perl syntax is not very efficient.

> C Perl Mode has several quirks that make it behave unlike a normal
> Emacs Major mode, including:
>
> - unorthodox code indentation
> - behaviour of TAB on region does not perform indent-region
> - use of specific faces instead of font-lock-* faces

This is exactly why comments like yours are welcome: I want to know
which of the differences are annoying for users of Perl mode.

In particular:

 - Code indentation: Both Perl mode and CPerl mode offer several user
   options to affect indentation (too many of them in CPerl mode IMHO).
   I am confident that it is possible to mimick Perl mode's default
   indentation by options.  Concrete examples are very welcome (like
   those you provided with your next reply).  They will make it into the
   test suite.

 - TAB for indenting region: That's also something that should be
   doable.  CPerl mode's behaviour for indent-region is indeed very
   idiosyncratic (and underdocumented).

 - use of specific faces: This will be fixed in CPerl mode anyway,
   independent of the deprecation.  This doesn't mean that the rich
   coloration which some people like will go away, but that all faces
   will default to font-lock-* faces if cperl-mode.el starts in Perl
   mode style.

> (Perl Mode, meanwhile, works just fine.)

Perl Mode works fine for many applications - but it also has a list of
deficiencies (and a list of open bugs, some of them pretty old).

> I don't wish to dampen the enthusiasm of the originator of this
> Perl->C Perl idea, but I would implore you to please first address C
> Perl Mode's shortcoming as a 1:1 replacement for Perl Mode before the 
> baby/bathwater? C Perl Mode should at least work as well as Perl Mode
> before deprecation is considered.

That's exactly what I'm trying to do these days.  It will take some
time, since it isn't the only project Im working on :/
-- 
Cheers,
haj



reply via email to

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