From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#26070: 26.0.50; js-mode slash insertion bug Date: Sun, 19 Mar 2017 11:22:32 +0000 Message-ID: References: <87wpbt8ev3.fsf@pokyo> <87fuig86ed.fsf@pokyo> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1489922662 6805 195.159.176.226 (19 Mar 2017 11:24:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 19 Mar 2017 11:24:22 +0000 (UTC) Cc: 26070@debbugs.gnu.org, Dmitry Gutov To: Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 19 12:24:17 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 1cpYwX-00011O-DQ for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Mar 2017 12:24:13 +0100 Original-Received: from localhost ([::1]:56329 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpYwd-0002Iu-Fe for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Mar 2017 07:24:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpYwT-0002Gz-MJ for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2017 07:24:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cpYwM-0000lj-7m for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2017 07:24:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36388) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cpYwM-0000lf-3i for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2017 07:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cpYwL-00061b-TD for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2017 07:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Mar 2017 11:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26070-submit@debbugs.gnu.org id=B26070.148992259123092 (code B ref 26070); Sun, 19 Mar 2017 11:24:01 +0000 Original-Received: (at 26070) by debbugs.gnu.org; 19 Mar 2017 11:23:11 +0000 Original-Received: from localhost ([127.0.0.1]:34587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpYvX-00060O-17 for submit@debbugs.gnu.org; Sun, 19 Mar 2017 07:23:11 -0400 Original-Received: from mail-ua0-f171.google.com ([209.85.217.171]:35025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpYvU-00060A-86 for 26070@debbugs.gnu.org; Sun, 19 Mar 2017 07:23:09 -0400 Original-Received: by mail-ua0-f171.google.com with SMTP id q7so63595625uaf.2 for <26070@debbugs.gnu.org>; Sun, 19 Mar 2017 04:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MikGyCiYPuNcN8wmdtL3wrziS2azup1UvuCLgEELc+Y=; b=fqpFqRTtwK3Svc6blSorAUNqx/h/a6r6oy0UD42PkT230kJ2KG8/iz7Wawh0QGAi3G h3QnGk+JxKafMdCLHOetJj3IbPbXeD0YQ7MjPGF+MnI8JbNQk4yLSnzEhg3CTE2acQHt IPYb5rAs5/DQE25s4gP+Z3kBYXQLQdoRZvURyCgHn5bE0wIbqdqo2tMc2puCzbp4+lur aKjHS0wlTJi2T30RmAgVU0XsvXuCrnp/WPE5F1MwuEqD2lbKIctlscYzOuZZwcDiF6nk DoQQsFWaHHmEDR2GDI0DjvzkpXMcvZjD3Fiy48fw9VVbjLlSBJst5oUR4Wm3sWs5knep gaVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MikGyCiYPuNcN8wmdtL3wrziS2azup1UvuCLgEELc+Y=; b=s03ebE3S6EkjaLO9AJ90nQUUeySNAQGcugrasDe2t/WfzrK1/FwN2uT9TkFjBUFQFC J1ITii5080Jxm6vB1fGi4Vxba3UVmvJUU7Lweg/Jlzuu6UjupnXVmCdeSAo6Z4poJx17 pkKdkN8eAokacDB4C6qrCyznwg24xJ4RxlnNN/0EHBQ96GO8uivUEHmAXx7Asklj3qAB UgdGud4y1SVCc0zKZ1B67KwZ2+JwDYnHhZQ7HY/bcU55Xh7ZGy6tkt672F2LfHTofvng InmnRAcUnMf3wvYccJVqN4kMMeJAMlL6oZEtUcsz1kKsV7ajippUQHe5BKnkKEGnY3wZ Zocw== X-Gm-Message-State: AFeK/H3fvsaUgWMSu72HpoCcK8AVw/rqL1NH1sWg5YxdI9k2fGze0i3LglKdO9LTNhSmhrRisSLJnLTk3k6sFw== X-Received: by 10.176.85.26 with SMTP id t26mr8295108uaa.7.1489922582516; Sun, 19 Mar 2017 04:23:02 -0700 (PDT) Original-Received: by 10.176.71.214 with HTTP; Sun, 19 Mar 2017 04:22:32 -0700 (PDT) In-Reply-To: <87fuig86ed.fsf@pokyo> 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:130726 Archived-At: On 14 March 2017 at 11:06, Tom Tromey wrote: >>>>>> "Dmitry" == Dmitry Gutov writes: > >>> I think once js-syntax-propertize is called, the regexp should always >>> succeed, so this patch makes the trailing "/" optional. > > Dmitry> Does it solve the infloop in the case like: > Dmitry> /x[ > Dmitry> as well? > > Yes, with the patch I don't get an infloop no matter which way I insert > those characters. > > Tom Caught one! Insert the text below in a JS-mode buffer, go to the beginning of the blank first line in function h() and type "/". There is an infloop. The infloop doesn't happen if the "/" in function g() is changed to a different operator. You can replace the 0s with other stuff, but you need at least that many characters (delete a 0 or a space and there is no infloop). function f() { function g() { 1 / 2; } function h() { 00000000000000000000000000000000000000000000000000; 00000000000000000000000000000000000000000000000000; 00000000000000000000000000000000000000000000000000; 00000000000000000000000000000000000000000000000000; 00000000000000000000000000000000000000000000000000; 00000000000000000000000000000000000000000000000000; 00000000000000000000000000000000000000000000000000; 00000000000000000000000000000000000000000000000000; 00; } }