emacs-devel
[Top][All Lists]
Advanced

[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: Dmitry Gutov
Subject: Re: [Emacs-diffs] master b01a429: js--re-search-backward-inner: Fix infloop
Date: Sat, 2 Feb 2019 03:08:09 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]