[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master b01a429: js--re-search-backward-inner: Fix infl
From: |
Eli Zaretskii |
Subject: |
Re: [Emacs-diffs] master b01a429: js--re-search-backward-inner: Fix infloop |
Date: |
Sat, 02 Feb 2019 09:31:53 +0200 |
> Cc: address@hidden
> From: Dmitry Gutov <address@hidden>
> Date: Sat, 2 Feb 2019 03:08:09 +0300
>
> On 01.02.2019 10:28, Eli Zaretskii wrote:
>
> > When was this issue introduced?
>
> One could say it was in 77ab7f84550993b44550879e10cd917b7bf02d04
> (2015-03-05) where support for multiline string literals was added, but
> the code expecting the strings to be exactly single-line was not updated.
>
> >> The bug was reported only recently, but it seems pretty annoying
> >> (infloop during indentation), and the fix is simple.
> >
> > Taken at face value, it doesn't look simple: you are switching from
> > using 2 elements of what syntax-ppss returns to a 3rd one. How do we
> > know this won't introduce other issues? Maybe if you describe the
> > logic of the change, I will agree with you.
>
> The purpose of the code is get out of the current literal. In the clause
> that was changes, to go to the beginning of the enclosing string.
>
> (goto-char (nth 8 parse)) is a reliable way to do that. The same
> function does that for comments anyway.
OK, please backport this.
Thanks.