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: Tue, 7 Feb 2017 04:20:40 +0200 Message-ID: References: <87wpd58ag6.fsf@tromey.com> <87shnt89be.fsf@tromey.com> <87o9yg8qdi.fsf@tromey.com> <87k2948onb.fsf@tromey.com> <183374a4-6469-44af-6ae6-fec02874547a@yandex.ru> <87bmuf8c1l.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 1486434071 3904 195.159.176.226 (7 Feb 2017 02:21:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 7 Feb 2017 02:21:11 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 Cc: 25529@debbugs.gnu.org, Stefan Monnier To: Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 07 03:21:07 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 1cavP0-0000se-PE for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Feb 2017 03:21:06 +0100 Original-Received: from localhost ([::1]:51597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cavP6-0007Zp-Co for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Feb 2017 21:21:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cavOz-0007ZZ-Gc for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2017 21:21:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cavOw-0002sH-P6 for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2017 21:21:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59985) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cavOw-0002s5-K5 for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2017 21:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cavOw-00057f-C2 for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2017 21:21: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: Tue, 07 Feb 2017 02:21: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.148643405019664 (code B ref 25529); Tue, 07 Feb 2017 02:21:02 +0000 Original-Received: (at 25529) by debbugs.gnu.org; 7 Feb 2017 02:20:50 +0000 Original-Received: from localhost ([127.0.0.1]:58184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cavOk-000575-Dt for submit@debbugs.gnu.org; Mon, 06 Feb 2017 21:20:50 -0500 Original-Received: from mail-wr0-f196.google.com ([209.85.128.196]:36029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cavOj-00056t-5w for 25529@debbugs.gnu.org; Mon, 06 Feb 2017 21:20:49 -0500 Original-Received: by mail-wr0-f196.google.com with SMTP id k90so4319615wrc.3 for <25529@debbugs.gnu.org>; Mon, 06 Feb 2017 18:20:49 -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=O8sxVgROmOq2gr9wN0y7IXgcUsl2a7xLSa4kI9hkMX8=; b=TZCdCm+chkW//tYyvJZ2395f6W/r9uRzuJpAROylBHC7Lter6FpHjdQBjRII/NIiBe itdhacCFNkFWmjMNsaRBdpk5IlvfK0bJSGYMa+fX9OflqCN/gBKbyNmxwtrwjJr6P4ef bdOLTkUhGNS7n8YbJBQ61aV0jkjzLHavhrnyX+szrNZhUjiEKWA2BeTWYCtYU1Ea7uMZ dPz5ulpsHhmHt7Mm3MBq4voygVUlj5Q0+g8aymRkq42eKB84FjgsXgBKwG0/DZGALJ4I R7h9fJbArDdqr24AbAwY9ri2CbOy60CpwHcmwxXyO2T8b4pvAgM9hKnQ46/uRiQQy58I zpsw== 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=O8sxVgROmOq2gr9wN0y7IXgcUsl2a7xLSa4kI9hkMX8=; b=hdanKfpeHHKronmdqxTbkvlumrOWyfoG4Nrj74261X57R96EuebvdQNeQx9LiL0mCV tJXxbxrtmKnuYSbZIi4cx6RfplylNeADI7Q8pmBOmXWCeZgVsBv1Nk3p+a73RUo3+FAJ MAmbkSnGGFK3X+x/ajTMTe6LvTg7sI3JkhMpcCJRWnDSdQuK1zQurW+J+sF2r/n9o5ZA icTzZldSby/U11+zeuKOpK1YGE/wS1JW2zcfno+oi81rnRA+dU0BU3bztVqu7+RiKpRs 2Na/4TqxSW/UUua7buA6vPcYQBuU2yw5TCJSE59NHsvUYHojlRfRXGB0f28oOwJzqh4g Ucuw== X-Gm-Message-State: AIkVDXJPts2OtKOq1vpnvvEqVCxrm6vKLBmII1eZTL5Yp3F2YMw6lY2EG1hiaf3la8KAmw== X-Received: by 10.223.153.98 with SMTP id x89mr11387222wrb.181.1486434043370; Mon, 06 Feb 2017 18:20:43 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.173.41]) by smtp.googlemail.com with ESMTPSA id b51sm4696151wrd.39.2017.02.06.18.20.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Feb 2017 18:20:42 -0800 (PST) In-Reply-To: <87bmuf8c1l.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:129047 Archived-At: On 06.02.2017 19:27, Tom Tromey wrote: > Yep, adding a goto-char at the end of the function fixed this. > Thanks for pointing that out; I'll add a test case for it. Thanks. > I think I understand combining the regexps. But what does using a simple > regexp for the closer mean? Simple handler (not regexp), for the group corresponding to the closer (what's called a HIGHLIGHTn in syntax-propertize-rules docstring). The string "\"/", probably. > Also, what is the purpose of the first call to > js-syntax-propertize-regexp in js-syntax-propertize? I'm not sure. Normally, that helps deal with multiline literals, but regexps in JavaScript are single-line. Maybe Stefan remembers. Or maybe it was a result of confusion: the code deleted in 6cd18349 includes this mistaken sentence: "XXX: Javascript can continue a regexp literal across lines so long as the newline is escaped with \."