GNU bug report logs -
#46024
Perl mode colors the word "argument" funny
Previous Next
Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Date: Thu, 21 Jan 2021 20:11:02 UTC
Severity: normal
Tags: fixed
Merged with 48761
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46024 in the body.
You can then email your comments to 46024 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46024
; Package
emacs
.
(Thu, 21 Jan 2021 20:11:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 21 Jan 2021 20:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Perl mode colors the word "argument" funny:
for ( $r[$v] ) {
$_->{argument} = 0 + shift;
}
Cperl mode doesn't.
emacs-version "27.1"
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46024
; Package
emacs
.
(Fri, 22 Jan 2021 00:35:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 46024 <at> debbugs.gnu.org (full text, mbox):
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:
> Perl mode colors the word "argument" funny:
> for ( $r[$v] ) {
> $_->{argument} = 0 + shift;
> }
> Cperl mode doesn't.
> emacs-version "27.1"
"argument" as a keyword in Perl mode came as a patch for Bug#27613 -
together with a couple of other keywords: anon, has, our, state,
supersede, let, and temp.
However, only 'our' and 'state' are part of Perl 5. A keyword 'has' is
available with popular Perl extensions (Moose, Moo etc.), so arguably
fontification as a declarator is acceptable... though slightly
inaccurate.
The keywords 'anon', 'has', 'supersede', 'let' and 'temp' are part of
the Raku language, which started as "Perl 6", as described in the
language docs:
https://docs.raku.org/language/variables#Variable_declarators_and_scope.
'argument' apparently didn't make it into the language at all, but Raku
also has 'augment' and 'constant', and Perl's 'local' is called 'temp'
in Raku.
CPerl mode has caught only a few keywords from non-core Perl, these are
also available with popular extensions ('try','catch','finally'). Perl
mode seems to have adopted some more Raku-stuff (e.g. it registers
variable names like "my $amazing-variable" to imenu, but fontifies only
the $amazing-part).
So I wonder: What is the ambition of Emacs to support Raku? The
languages Perl (Perl 5) and Raku (Perl 6) have diverged in their syntax,
so robably it is rather cumbersome to support both with any of the Perl
modes. In my opionion, randomly adding Raku features to the modes
brings more confusion than productivity, and in any case keywords which
are no longer part of either language should be eliminated, in
particular: 'argument', which is the topic of this bug report.
--
Cheers,
haj
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46024
; Package
emacs
.
(Fri, 22 Jan 2021 18:39:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 46024 <at> debbugs.gnu.org (full text, mbox):
haj <at> posteo.de (Harald Jörg) writes:
> So I wonder: What is the ambition of Emacs to support Raku? The
> languages Perl (Perl 5) and Raku (Perl 6) have diverged in their syntax,
> so robably it is rather cumbersome to support both with any of the Perl
> modes. In my opionion, randomly adding Raku features to the modes
> brings more confusion than productivity, and in any case keywords which
> are no longer part of either language should be eliminated, in
> particular: 'argument', which is the topic of this bug report.
Long term, it does seem like the best solution would be to have a
separate mode for Raku, and not keep tweaking (c)perl-mode to add Raku
features, I think.
So backing out this change ('argument' etc) sounds like a good idea to
me.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46024
; Package
emacs
.
(Wed, 27 Jan 2021 14:09:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 46024 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> [...]
> Long term, it does seem like the best solution would be to have a
> separate mode for Raku, and not keep tweaking (c)perl-mode to add Raku
> features, I think.
>
> So backing out this change ('argument' etc) sounds like a good idea to
> me.
The attached patch removes the declarators and prefixes which are not in
Perl.
BTW: There is a Raku mode, maintained by the Raku team in their
repository on GitHub.
--
Cheers,
haj
[0001-perl-mode.el-Eliminate-keywords-which-are-not-in-Per.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46024
; Package
emacs
.
(Thu, 28 Jan 2021 03:24:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 46024 <at> debbugs.gnu.org (full text, mbox):
haj <at> posteo.de (Harald Jörg) writes:
> The attached patch removes the declarators and prefixes which are not in
> Perl.
Thanks; applied to Emacs 28.
> BTW: There is a Raku mode, maintained by the Raku team in their
> repository on GitHub.
I see... and checking with `package-list', it's also on Melpa.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 28 Jan 2021 03:24:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
46024 <at> debbugs.gnu.org and 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 28 Jan 2021 03:24:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 25 Feb 2021 12:24:06 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
haj <at> posteo.de (Harald Jörg)
to
control <at> debbugs.gnu.org
.
(Tue, 01 Jun 2021 11:01:01 GMT)
Full text and
rfc822 format available.
Forcibly Merged 46024 48761.
Request was from
haj <at> posteo.de (Harald Jörg)
to
control <at> debbugs.gnu.org
.
(Tue, 01 Jun 2021 11:01:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 29 Jun 2021 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 300 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.