From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#997: perl mode blows "'" etc. Date: Sat, 29 Feb 2020 03:58:35 +0100 Message-ID: <87a75285gk.fsf@stefankangas.se> References: <871vzhoasd.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="23104"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 997@debbugs.gnu.org To: jidanni@jidanni.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 29 03:59:12 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 1j7sLQ-0005uR-0x for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Feb 2020 03:59:12 +0100 Original-Received: from localhost ([::1]:56666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7sLO-0008Dk-Mk for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Feb 2020 21:59:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44722) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7sLH-0008DX-8t for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 21:59:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7sLG-00042E-89 for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 21:59:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56286) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7sLG-000423-1O for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 21:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j7sLG-0000sK-0w for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2020 21:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Feb 2020 02:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 997 X-GNU-PR-Package: emacs Original-Received: via spool by 997-submit@debbugs.gnu.org id=B997.15829451273336 (code B ref 997); Sat, 29 Feb 2020 02:59:01 +0000 Original-Received: (at 997) by debbugs.gnu.org; 29 Feb 2020 02:58:47 +0000 Original-Received: from localhost ([127.0.0.1]:34024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7sL1-0000rj-9w for submit@debbugs.gnu.org; Fri, 28 Feb 2020 21:58:47 -0500 Original-Received: from ted.gofardesign.uk ([67.225.143.91]:54486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7sKx-0000rK-4S; Fri, 28 Feb 2020 21:58:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Rvd3hCyM8G+ryGVWy0Nee6gfe1E/EXf6ZLENC2V2zIE=; b=TyU+I0GYiSSAsfRxdovGkVsgUw XKol6iUeOOFzA7YPQdMI4epDCIHFuvFF2UEgOLueHyMieKTLNFnVZtsRolR30/Cx65+VwD50QEwqZ VwOSG/H4uKL3O0IB9RcV7Aq10RxPowIQuzuSWRFYVva5zNYEGtj+oHClp+bjWga8L3aRKPfTte/HW 7ilE+Fe0NJQTp2EAFe75S5oYl1eSrmdRxGl5soS/GxVpf+5TNJBYj7azerG05KLyI48sOKChdgtOx AE1ppFw8SZn1ZYdLaGVLInHNI/B7KicA62S0nztlsck1tmBD4AoUnrnEXK5OpjfU6dE8UHsBbF4BV eilyD2NQ==; Original-Received: from h-4-70-69.a785.priv.bahnhof.se ([155.4.70.69]:44392 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1j7sKq-001PoC-W8; Fri, 28 Feb 2020 21:58:37 -0500 In-Reply-To: <871vzhoasd.fsf@jidanni.org> (jidanni's message of "Thu, 18 Sep 2008 21:15:14 +0800") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:176633 Archived-At: title 997 Incorrect perl-mode syntax highlighting in some cases (e.g. using "'") tags 997 confirmed found 997 28.0.50 thanks jidanni@jidanni.org writes: > Perl mode screws up bad with this file. Cperl mode gets it better. > $ perl -c p.pl > p.pl syntax OK > $ cat p.pl > /this is a perl program to demonstrate emacs's wacky color biz/; > /this line is in the wrong color until here'/; #/// I can reproduce this on current master (28.0.50). Open a file like this using perl-mode under emacs -Q to see the incorrect highlighting: /correct 'incorrect/; /incorrect' correct/; The problem goes away if the file looks like this instead: $foo =~ /foobar/; /correct 'incorrect/; /incorrect 'correct/; > /\b.*\bpic(ture)?s\b/; > /this line is in the wrong color/; > #this comment turns back on emacs correct color: \b\b > /this line is in the right color/; > /but not this line until the end\/;/m; I see some incorrect highlighting in this example too. Adding the "$foo =~ /foobar/;" line from above seems to fix it here too. > $ emacs -Q p.pl > Anyway, one usually ends up having to stick in special comments with > some / ; ` ' etc. in them lest large tracts of code become the wrong > color. emacs-version "22.2.1" I tried inserting the problematic lines into a larger Perl file, but I couldn't reproduce the issue. I'm not sure if that means that the incorrect coloring only happens when these lines are inserted at the very beginning of a file. Best regards, Stefan Kangas