From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: haj@posteo.de (Harald =?UTF-8?Q?J=C3=B6rg?=) Newsgroups: gmane.emacs.bugs Subject: bug#46024: Perl mode colors the word "argument" funny Date: Fri, 22 Jan 2021 01:33:55 +0100 Message-ID: <87pn1xu7ws.fsf@hajtower> References: <87ft2uvyww.5.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27021"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: 46024@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 22 01:37:08 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2kRo-0006vX-4T for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jan 2021 01:37:08 +0100 Original-Received: from localhost ([::1]:40496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2kRn-0001B5-6h for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Jan 2021 19:37:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2kPn-0007yG-L0 for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2021 19:35:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l2kPm-00086Z-7L for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2021 19:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l2kPm-00071o-4X for bug-gnu-emacs@gnu.org; Thu, 21 Jan 2021 19:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: haj@posteo.de (Harald =?UTF-8?Q?J=C3=B6rg?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jan 2021 00:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46024 X-GNU-PR-Package: emacs Original-Received: via spool by 46024-submit@debbugs.gnu.org id=B46024.161127564626948 (code B ref 46024); Fri, 22 Jan 2021 00:35:02 +0000 Original-Received: (at 46024) by debbugs.gnu.org; 22 Jan 2021 00:34:06 +0000 Original-Received: from localhost ([127.0.0.1]:59744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2kOs-00070a-Be for submit@debbugs.gnu.org; Thu, 21 Jan 2021 19:34:06 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:60951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2kOp-000703-C3 for 46024@debbugs.gnu.org; Thu, 21 Jan 2021 19:34:04 -0500 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id B1E6D2400FB for <46024@debbugs.gnu.org>; Fri, 22 Jan 2021 01:33:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1611275636; bh=Bf8A+ZV5Q8InsUEWygtKrNU52GYXFZ77rSq/ZGYmoH8=; h=From:To:Cc:Subject:Date:From; b=pxtKe7TkqLep3X01i1nz1vjwAspAqQcC5t9C78NtpfT17kaCb6tfvBgRWOCzwIIgT KyWvUR2aGsv8vYFlYG13V4X1RuFUo0H7+x0T2PpSr0E4wf0n+onh3QKCxvMEZaBJZA I50HfBTaeMwkGABwmHtlzXhN94YhbEBRQw2rCv56LbxYopHjY3ajUVT6KBZ+trE2xI 6f6yXENH5/C4Nj3CNfFg+llnfzb3NKtJrmnhuZTlzhyUyuSBiBQa1CDTNIfwKE2ejr zVNl/dbtNo6tkhsp/qhHkNHEbPkRMjTWe/CvaiAwcx40PutlHtdhYPr4O7hXCtSE6k 6TEo4uprv5EXw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DMKxv6zGdz9rxK; Fri, 22 Jan 2021 01:33:55 +0100 (CET) In-Reply-To: <87ft2uvyww.5.fsf@jidanni.org> ("=?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson"'s message of "Fri, 22 Jan 2021 04:05:19 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:198355 Archived-At: =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: > Perl mode colors the word "argument" funny: > for ( $r[$v] ) { > $_->{argument} =3D 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. --=20 Cheers, haj