unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Copley <rcopley@gmail.com>
To: Tom Tromey <tom@tromey.com>
Cc: 26070@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>
Subject: bug#26070: 26.0.50; js-mode slash insertion bug
Date: Sun, 19 Mar 2017 11:22:32 +0000	[thread overview]
Message-ID: <CAPM58ogiR-GH_TF7cSLrAPfDinB2ijciwXgWc7cmtYHNVEFw3w@mail.gmail.com> (raw)
In-Reply-To: <87fuig86ed.fsf@pokyo>

On 14 March 2017 at 11:06, Tom Tromey <tom@tromey.com> wrote:
>>>>>> "Dmitry" == Dmitry Gutov <dgutov@yandex.ru> 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;
    }
}





  reply	other threads:[~2017-03-19 11:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-12 10:23 bug#26070: 26.0.50; js-mode slash insertion bug Richard Copley
2017-03-13 13:50 ` Tom Tromey
2017-03-13 19:12   ` Richard Copley
2017-03-14  5:56   ` Dmitry Gutov
2017-03-14 11:06     ` Tom Tromey
2017-03-19 11:22       ` Richard Copley [this message]
2017-03-22 22:18         ` Tom Tromey
2017-03-23  7:00           ` Richard Copley
2017-03-24  3:53             ` Tom Tromey
2017-03-31  7:53               ` Dmitry Gutov
2017-04-01 21:15 ` bug#26070: fixed Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPM58ogiR-GH_TF7cSLrAPfDinB2ijciwXgWc7cmtYHNVEFw3w@mail.gmail.com \
    --to=rcopley@gmail.com \
    --cc=26070@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).