From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#25529: diagnosis and one approach to a fix Date: Mon, 6 Feb 2017 03:12:31 +0200 Message-ID: <183374a4-6469-44af-6ae6-fec02874547a@yandex.ru> References: <87wpd58ag6.fsf@tromey.com> <87shnt89be.fsf@tromey.com> <87o9yg8qdi.fsf@tromey.com> <87k2948onb.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1486343596 24855 195.159.176.226 (6 Feb 2017 01:13:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2017 01:13:16 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 Cc: 25529@debbugs.gnu.org To: Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 06 02:13:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caXrj-0006DB-53 for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Feb 2017 02:13:11 +0100 Original-Received: from localhost ([::1]:45072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caXrn-0007fQ-7O for geb-bug-gnu-emacs@m.gmane.org; Sun, 05 Feb 2017 20:13:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caXrf-0007dt-7l for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 20:13:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1caXra-0001yQ-K6 for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 20:13:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58827) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1caXra-0001xz-H7 for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 20:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1caXra-0002VV-5w for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2017 20:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Feb 2017 01:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25529 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25529-submit@debbugs.gnu.org id=B25529.14863435639614 (code B ref 25529); Mon, 06 Feb 2017 01:13:02 +0000 Original-Received: (at 25529) by debbugs.gnu.org; 6 Feb 2017 01:12:43 +0000 Original-Received: from localhost ([127.0.0.1]:57026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caXrH-0002V0-AK for submit@debbugs.gnu.org; Sun, 05 Feb 2017 20:12:43 -0500 Original-Received: from mail-wm0-f68.google.com ([74.125.82.68]:36798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1caXrD-0002Um-QR for 25529@debbugs.gnu.org; Sun, 05 Feb 2017 20:12:40 -0500 Original-Received: by mail-wm0-f68.google.com with SMTP id r18so18901977wmd.3 for <25529@debbugs.gnu.org>; Sun, 05 Feb 2017 17:12:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YFT8rAYfc8sAf1+C3Gesx246CfS3L0FkQyMbWdMf/a0=; b=INJ1PlYIOri20rEQRA6JhaZmfvIDV2nEiC71srQZO1Dj6Xzjt6epWfyJbiYBNllTg5 EG6fD7iRkMf5uST8uDZA9KC0nCYkEQZ4il+FN8zJ004O4pzADxfkqvxSOWGx2LO9gpj6 qESNmHBYFFfJ9jmle1i/IMPTFoZCL9UwDOmMLV6krAXl4h2lP0oWe9Mm/hDUPsrdPgKf HsUvpPhDHWsQkQruxP4Xpwwzfcly1rzk8UO1vHW05HOoq7j4awm1bg5MmCIUdNm6yQKx cGerv9JcH0IfEYOd7G6t4a96g2J50ed3vi2lhUrBP1O1JIgx8ljRGEQbc8ESHo6gODdg AVEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YFT8rAYfc8sAf1+C3Gesx246CfS3L0FkQyMbWdMf/a0=; b=cYhk9fGcIAdqLzaHA8TDNI5lpAtnIp85rI3lksDZZLPDrYZHDyrxqWsp/99ncBZARS 3YM2V5n28OhUbewnjV/RxphuteWpHC1fe8w8F9fIpEXgD/zrikpYlIvTuGM9S4iudodb dwD3yx0MRoIN1OtLVOWDb++PAmKSTZKR6CBM3BUh4PoTAxbpX8xBnsMOpgsM1PlIpq5o X9mZy/hGz3IT57lDD5L9/tq8gpyM5zqA0jAHVyVl9nvhSfisxAUORE6SOGQxPZPG0Zra Qnz3GosG19iGKH4ecvBA3BezbHGa+UM2kPf5JECnGV3vmodjqNFSteXU6xaLnyEI0KFK XkRw== X-Gm-Message-State: AIkVDXJVZURSMxthjN94aIuuTVaU0NDIzTeJhE2RetCeWboe7ZlUgZaoLHScuLAbC7htBw== X-Received: by 10.223.178.87 with SMTP id y23mr6686677wra.91.1486343553716; Sun, 05 Feb 2017 17:12:33 -0800 (PST) Original-Received: from [10.8.0.14] (v-2-eu19-d3962-07.webazilla.com. [78.140.151.7]) by smtp.googlemail.com with ESMTPSA id i189sm9922317wmg.7.2017.02.05.17.12.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Feb 2017 17:12:32 -0800 (PST) In-Reply-To: <87k2948onb.fsf@tromey.com> Content-Language: en-US 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: 208.118.235.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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129017 Archived-At: Hey Tom, On 05.02.2017 20:43, Tom Tromey wrote: > Tom> Another way is to use a regexp, see appended. > Tom> I'll try to write a test for this soon. > > Now with a test. This is very good, thank you. Here's just one example I've come so far that works with the old code, but not with yours: let x = /[/]/; And that's probably just because the new js-syntax-propertize-regexp doesn't move point forward after matching (the current one leaves it after the closing slash), because the regexp in js-syntax-propertize is too primitive. We could try to combine the regexps together, though. Then we'd move the syntax-ppss status check inside the rule for the opening delimiter, and use a simple one for the closer. > + "Regular expression matching the body of a JavaScript regexp literal.") Maybe remove "the body of". The regexp matches the delimiters as well. Thanks!