unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master b01a429: js--re-search-backward-inner: Fix infloop
Date: Sat, 2 Feb 2019 03:08:09 +0300	[thread overview]
Message-ID: <1312a80d-c09f-c64a-b0ff-d03fa6217574@yandex.ru> (raw)
In-Reply-To: <83a7jgynk5.fsf@gnu.org>

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	other threads:[~2019-02-02  0:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190201000223.22803.66102@vcs0.savannah.gnu.org>
     [not found] ` <20190201000224.6638E20B45@vcs0.savannah.gnu.org>
2019-02-01  0:27   ` [Emacs-diffs] master b01a429: js--re-search-backward-inner: Fix infloop Dmitry Gutov
2019-02-01  7:28     ` Eli Zaretskii
2019-02-02  0:08       ` Dmitry Gutov [this message]
2019-02-02  7:31         ` Eli Zaretskii
2019-02-23 23:43           ` Dmitry Gutov
2019-02-24  3:36             ` Eli Zaretskii
2019-02-26  1:01               ` Dmitry Gutov

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=1312a80d-c09f-c64a-b0ff-d03fa6217574@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).