From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "E. Choroba" Newsgroups: gmane.emacs.bugs Subject: bug#47598: cperl-mode: Highlighting confused with ternary and -x Date: Mon, 5 Apr 2021 02:04:56 +0200 (CEST) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17536"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.21 (LSU 202 2017-01-01) To: 47598@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 05 02:06:10 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 1lTCks-0004RI-8H for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Apr 2021 02:06:10 +0200 Original-Received: from localhost ([::1]:39484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTCkr-0003Lz-AT for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Apr 2021 20:06:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTCkk-0003Ln-A8 for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 20:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53339) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTCkk-00089R-2t for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 20:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lTCkj-00079U-U3 for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 20:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "E. Choroba" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Apr 2021 00:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47598 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161758111927438 (code B ref -1); Mon, 05 Apr 2021 00:06:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Apr 2021 00:05:19 +0000 Original-Received: from localhost ([127.0.0.1]:36652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTCk3-00078S-FO for submit@debbugs.gnu.org; Sun, 04 Apr 2021 20:05:19 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTCjz-00078H-UR for submit@debbugs.gnu.org; Sun, 04 Apr 2021 20:05:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTCjz-0003F7-Q9 for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 20:05:15 -0400 Original-Received: from ufal-mail.mff.cuni.cz ([195.113.20.158]:59010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTCjx-0007iL-RR for bug-gnu-emacs@gnu.org; Sun, 04 Apr 2021 20:05:15 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ufal-mail.mff.cuni.cz (Postfix) with ESMTP id 9175E736CF0 for ; Mon, 5 Apr 2021 02:05:06 +0200 (CEST) Original-Received: from ufal-mail.mff.cuni.cz ([127.0.0.1]) by localhost (ufal-mail.mff.cuni.cz [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Qq6utk0wBdcD for ; Mon, 5 Apr 2021 02:05:06 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ufal-mail.mff.cuni.cz (Postfix) with ESMTP id 8667C7502AD for ; Mon, 5 Apr 2021 02:05:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at ufal.mff.cuni.cz Original-Received: from ufal-mail.mff.cuni.cz ([127.0.0.1]) by localhost (ufal-mail.mff.cuni.cz [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wVd0WnxshIjG for ; Mon, 5 Apr 2021 02:05:06 +0200 (CEST) Original-Received: from [192.168.0.200] (83-101-243-80.cust.centrio.cz [80.243.101.83]) by ufal-mail.mff.cuni.cz (Postfix) with ESMTPSA id 476B27379C2 for ; Mon, 5 Apr 2021 02:05:06 +0200 (CEST) X-X-Sender: choroba@silent Received-SPF: none client-ip=195.113.20.158; envelope-from=choroba@matfyz.cz; helo=ufal-mail.mff.cuni.cz X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:203575 Archived-At: When combining the ternary operator with file tests using the default argument, cperl-mode gets confused. For example: my $f = -f ? 'file' : -l ? [readlink] : -d ? 'dir' : 'unknown'; It seems to think the ?'s are not part of a ternary operator, but rather a match-once operator. Note that m?? without m results in a syntax error since Perl 5.22. Ch.