From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master b01a429: js--re-search-backward-inner: Fix infloop Date: Sat, 2 Feb 2019 03:08:09 +0300 Message-ID: <1312a80d-c09f-c64a-b0ff-d03fa6217574@yandex.ru> References: <20190201000223.22803.66102@vcs0.savannah.gnu.org> <20190201000224.6638E20B45@vcs0.savannah.gnu.org> <6f4122fb-8dcc-836d-9b80-388d417f8cc2@yandex.ru> <83a7jgynk5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="120418"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 02 01:09:03 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gpirh-000V8Q-Pt for ged-emacs-devel@m.gmane.org; Sat, 02 Feb 2019 01:08:57 +0100 Original-Received: from localhost ([127.0.0.1]:35031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpirg-0001wY-LO for ged-emacs-devel@m.gmane.org; Fri, 01 Feb 2019 19:08:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpirZ-0001vy-AU for emacs-devel@gnu.org; Fri, 01 Feb 2019 19:08:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpirY-0003N4-5y for emacs-devel@gnu.org; Fri, 01 Feb 2019 19:08:49 -0500 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:41925) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpirX-00038j-Oz; Fri, 01 Feb 2019 19:08:48 -0500 Original-Received: by mail-lf1-x12f.google.com with SMTP id c16so6330730lfj.8; Fri, 01 Feb 2019 16:08:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=SxG6F7GUHtX7D5beicM1owsBuMKraUAGED9RGL7bJN4=; b=WbGQr9cxPwWuCuC+e1vT3KCrq9268GZS53ewIvxgtRpffK7MDmmgBlXrAGXeC9C6z/ YEGSnku5imKUZhRMNV4TiAMwfVHJZc/0bZP4ZIDwizcrvZ8ZTZ31NcMedgMvYBmfDMiG ISM3axLenlD6nfmC0xfKip6ocWXMvOPMLefuykSt3PdAer3bs3cVU3yHb9y6j/Ftp7ql 5s7Hhz6se/x20ezxKNnWPqgWX1P+Z9Z10Uc34Mad7cm7baTRWOLyEf9U8tVxYn3JAjzu H36vvQO/wOkUfTkYKhYUyLxI/AFA5ZXApWCiiOq8xUvDzGeOhUPSAXvdXrzKE7/jIXkD RdFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SxG6F7GUHtX7D5beicM1owsBuMKraUAGED9RGL7bJN4=; b=jzB2isepzSl+7A9c5LZKPzYxAvznQY8BV20LKFqXio4adIfU8VVOOKVpldh9v7S3ZD jX8k8IvOjy+JN4LadOww0rppP8GtuxXDLyOIwS43ZeL/eHTNWL/HpRZb6VX+Ph3MmVbt ykcsxuA1FIxwqVCsooHomUge3QKQbgCK5xjsObDd/wnV8M/7BIawNiDMV1FMbQN93a3N W0YCNMeIfv8Qv8MPGsvR64tIbnxgW4VjaHbHCVwrnDMNLZF25q++0p5TYQFo96Pjz+k5 xoXjkOnyEQmJUzuTkshCKGm3aRYRkarLfeK9wiCsyPZl5YIH+UOOAnde7cwQo1QKrBPt fVbw== X-Gm-Message-State: AJcUukcQrYGTEjJbJT2ga+W+F/QuKM0J7WJaIMVFr2j6ss9mwQ3epbVR T7nKgSbqO4T8F7yOrs28wP+aUTo8 X-Google-Smtp-Source: ALg8bN5vr++SKrY7GrFEceFnL5oUm7yyDDQ9LQNyeoiTiqWpptsYh04nNIBOI4fJWrIdTWa3BxCOEA== X-Received: by 2002:a19:a40f:: with SMTP id q15mr32061660lfc.4.1549066091242; Fri, 01 Feb 2019 16:08:11 -0800 (PST) Original-Received: from [192.168.0.108] ([79.175.3.71]) by smtp.googlemail.com with ESMTPSA id q11sm478255lfb.28.2019.02.01.16.08.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 16:08:10 -0800 (PST) In-Reply-To: <83a7jgynk5.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::12f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232895 Archived-At: 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.