From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#42168: 26.1; cperl-mode: Bad interpretation of $a++ / $b Date: Wed, 12 Aug 2020 17:40:19 -0700 Message-ID: References: <83v9iunzrm.fsf@gnu.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="10014"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 42168@debbugs.gnu.org, Harald =?UTF-8?Q?J=C3=B6rg?= To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 13 02:41:43 2020 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 1k61JP-0002QU-I6 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Aug 2020 02:41:43 +0200 Original-Received: from localhost ([::1]:53974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k61JO-0007Wa-KI for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Aug 2020 20:41:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k61Il-0006yu-1r for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 20:41:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k61Ik-0001cp-NP for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 20:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k61Ik-0007Ge-LM for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 20:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Aug 2020 00:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42168 X-GNU-PR-Package: emacs Original-Received: via spool by 42168-submit@debbugs.gnu.org id=B42168.159727922927876 (code B ref 42168); Thu, 13 Aug 2020 00:41:02 +0000 Original-Received: (at 42168) by debbugs.gnu.org; 13 Aug 2020 00:40:29 +0000 Original-Received: from localhost ([127.0.0.1]:46079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k61ID-0007FY-D8 for submit@debbugs.gnu.org; Wed, 12 Aug 2020 20:40:29 -0400 Original-Received: from mail-yb1-f176.google.com ([209.85.219.176]:40988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k61I9-0007Ey-HN for 42168@debbugs.gnu.org; Wed, 12 Aug 2020 20:40:26 -0400 Original-Received: by mail-yb1-f176.google.com with SMTP id s195so2362352ybc.8 for <42168@debbugs.gnu.org>; Wed, 12 Aug 2020 17:40:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc :content-transfer-encoding; bh=WdLDsgDIej8ZgM0EpBCN7KQO10Ow1PbG2jTUhPaHXpk=; b=GRgmoH/H+iy79vO0pIGQhzcRLUDnJz7pnjLzfQD3xoOyI/TYhIN4o7YuNb266m5gVv pDFl5H3sRbXOO0z0Kn18BMYOcFXLlPg9DaBVTBmWRa6FcLLhOBBHvKSbWc/1QE6cWUA5 uPtfQPW44IY0aYWQEVFDhAGLhZBPfuYY8r1ba2zd3R++zIPZM58vAbHTZk7uW04FGyPZ 5YtRmP8qJHBRGhw+RK3IDfudTxlYaWNX/KPx5jULTigBHLujEn7kBwb2px3sJYmQ3B67 gmqnaQtlibQCtDdNJhR0hHl6aUPnRfav0ree8iUmR8EvSsSwnQQ/x+7z4CXWaG8QwDAV bsGQ== X-Gm-Message-State: AOAM532vbg1v8PlDQ5yl8/hatXUzznZg/7pFoKtYFfL7b1W8h83UTAM5 m1GULlrXSv2XHkG0gl9Wh5m202AL+KOHxpvCRtScse/E6IU= X-Google-Smtp-Source: ABdhPJwuV9WmWouPqpg8XuCPN33q2XC1Rg9EZc42MINQ1a1pRtF0uJWxxPq1AkgQj4F/slAeO4Abm+7D7KNLLRqjwLk= X-Received: by 2002:a5b:508:: with SMTP id o8mr3267507ybp.43.1597279220064; Wed, 12 Aug 2020 17:40:20 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 12 Aug 2020 17:40:19 -0700 In-Reply-To: <83v9iunzrm.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 11 Jul 2020 12:53:49 +0300") 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:184909 Archived-At: Eli Zaretskii writes: >> From: Harald J=C3=B6rg >> Date: Thu, 2 Jul 2020 20:19:21 +0200 >> >> How to reproduce: >> In a buffer, activate cperl-mode (M-x cperl-mode), then enter: >> >> $a++ / $b; >> >> This is supposed to be a division. However, cperl-mode interprets the >> slash as the start of a regular expression. Accordingly, the following >> text is displayed with the wrong face, and also cperl-mode might >> complain that it can't find the end of the regular expression. >> >> Emacs does not crash. >> >> Attached: A patch which fixes the issue for $a++ and $a--, and also >> includes a test to verify that the very similar text "$a+ / $b" is still >> correctly interpreted as a regular expression. > > Thanks. > > To accept a substantial contribution such as this one, we will need > you to assign the copyright of your code to the FSF. If you are okay > with starting your legal paperwork, I will send you the form to sign > and email. > > Thank you for your interest in Emacs. Harald, would you be willing to sign the copyright papers? Please find out more about the reason for this here: https://www.gnu.org/licenses/why-assign.html Best regards, Stefan Kangas