From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#25529: diagnosis and one approach to a fix Date: Fri, 10 Feb 2017 22:45:54 -0500 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> <87vash5wag.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486784834 613 195.159.176.226 (11 Feb 2017 03:47:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Feb 2017 03:47:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: 25529@debbugs.gnu.org, Dmitry Gutov To: Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 11 04:47:10 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 1ccOeU-0008Ec-2g for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Feb 2017 04:47:10 +0100 Original-Received: from localhost ([::1]:46997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccOeW-0001FK-A6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Feb 2017 22:47:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccOeQ-0001FD-73 for bug-gnu-emacs@gnu.org; Fri, 10 Feb 2017 22:47:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccOeN-0001mo-2w for bug-gnu-emacs@gnu.org; Fri, 10 Feb 2017 22:47:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37036) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ccOeM-0001mk-Vq for bug-gnu-emacs@gnu.org; Fri, 10 Feb 2017 22:47:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ccOeM-0001Z7-L4 for bug-gnu-emacs@gnu.org; Fri, 10 Feb 2017 22:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Feb 2017 03:47: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.14867847645950 (code B ref 25529); Sat, 11 Feb 2017 03:47:02 +0000 Original-Received: (at 25529) by debbugs.gnu.org; 11 Feb 2017 03:46:04 +0000 Original-Received: from localhost ([127.0.0.1]:35235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccOdQ-0001Xu-Ez for submit@debbugs.gnu.org; Fri, 10 Feb 2017 22:46:04 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:11336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccOdN-0001XG-5h for 25529@debbugs.gnu.org; Fri, 10 Feb 2017 22:46:02 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AgKQAu3EVY//7rSC1dGgEBAQECAQEBAQgBAQEBgzgBAQEBAR+EW4VUnBAYAZZeGYYDBAICghFEEAECAQEBAQEBAWIohGkGViMQCzQSFBgNJIkCrRSLRAEBCAIBJIsZiikBBI98hQCFapJzAYgmhjqSDzYgeBMOhXMgiS0BAQE X-IPAS-Result: A0AgKQAu3EVY//7rSC1dGgEBAQECAQEBAQgBAQEBgzgBAQEBAR+EW4VUnBAYAZZeGYYDBAICghFEEAECAQEBAQEBAWIohGkGViMQCzQSFBgNJIkCrRSLRAEBCAIBJIsZiikBBI98hQCFapJzAYgmhjqSDzYgeBMOhXMgiS0BAQE X-IronPort-AV: E=Sophos;i="5.33,749,1477972800"; d="scan'208";a="292617377" Original-Received: from 45-72-235-254.cpe.teksavvy.com (HELO fmsmemgm.homelinux.net) ([45.72.235.254]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Feb 2017 22:45:54 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 3BFF1AE0F1; Fri, 10 Feb 2017 22:45:54 -0500 (EST) In-Reply-To: <87vash5wag.fsf@tromey.com> (Tom Tromey's message of "Fri, 10 Feb 2017 18:52:07 -0700") 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:129229 Archived-At: > -(defun js-syntax-propertize-regexp (end) > +(defun js-syntax-propertize-regexp () Removing the `end` argument is fundamentally wrong. It's OK to play it fast-and-loose and ignore that argument, but the function *should* keep the buffer untouched after `end`. > + (put-text-property (match-beginning 1) (match-end 1) ^^^^^^^^^^^^^ (min end (match-end 1)) should do it. Stefan