|
From: | Paul W. Rankin |
Subject: | Re: Please do not deprecate perl-mode in favour of cperl-mode |
Date: | Sun, 03 Dec 2023 18:21:19 +1000 |
User-agent: | Purely Mail via Roundcube/1.6.5 |
On 2023-12-03 17:07, Eli Zaretskii wrote:
C Perl Mode has several quirks that make it behave unlike a normal EmacsMajor mode, including: - unorthodox code indentation - behaviour of TAB on region does not perform indent-region - use of specific faces instead of font-lock-* facesWhat if CPerl mode would optionally support the above as well? Would it be acceptable then for you to switch?
I would love to take advantage of whatever CPerl Mode advantages exist if CPerl Mode could do the things that Perl Mode does. And I think it should be easy and clear to the user how to set these options.
Here's a minimal example of perl code that indents in a way I find unexpected in CPerl Mode (e.g. the trailing paren should line up with the start of the statement):
$r->get( '/test' );I also found weird behaviour with Electric Pair Mode; when point is at `|' here and `{' is inserted, I get `{|}}', which seems incorrect because it unbalances the braces (Perl Mode inserts `{|}'):
$r->get( '/test', sub { | } ); One more thing...CPerl Mode has a feature the applies the `underline' face to leading whitespace before point and there doesn't appear to be an option to disable this. It's not a huge thing, but Whitespace Mode provides this feature and it's just a weird addition to hardcode and not use something called `cperl-leading-whitespace-face'.
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'sshortcoming 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.Deprecation doesn't mean removal. Even obsolete packages are still available, and some of them will not be removed. So if you insist on using Perl mode, you will be able to do so for the years to come, even if we deprecate and obsolete it.
This is cool. My opinion is that CPerl Mode is (currently) too weird and idiosyncratic to be Emacs's default mode for perl (e.g. what the heck is `cperl-hairy' or `cperl-fontify-m-as-s'?) and will likely lead to more confusion than productivity/joy. But maybe if someone wants to take a hard look at CPerl Mode from a user friendliness perspective?
[Prev in Thread] | Current Thread | [Next in Thread] |