From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#30393: 24.4; cperl-mode: indentation failure Date: Sun, 11 Feb 2018 10:36:10 +0000 Message-ID: <20180211103610.GA4515@ACM> References: <20180208152552.GL13340@hodi> <20180209175040.63536.qmail@mail.muc.de> <3331f80a-c5aa-5cb9-8088-0a88888bdaca@yandex.ru> <20180210112654.GA4537@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1518346001 32326 195.159.176.226 (11 Feb 2018 10:46:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Feb 2018 10:46:41 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: 30393@debbugs.gnu.org, Dmitry Gutov , Noam Postavsky To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 11 11:46:36 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekp95-0006PP-Hz for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Feb 2018 11:46:07 +0100 Original-Received: from localhost ([::1]:48699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekpB7-0007WS-7X for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Feb 2018 05:48:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekpAz-0007VM-GY for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2018 05:48:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekpAw-0006SW-4V for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2018 05:48:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57975) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ekpAw-0006S6-0N for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2018 05:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ekpAv-0008Ak-JY for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2018 05:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Feb 2018 10:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30393 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30393-submit@debbugs.gnu.org id=B30393.151834602631351 (code B ref 30393); Sun, 11 Feb 2018 10:48:01 +0000 Original-Received: (at 30393) by debbugs.gnu.org; 11 Feb 2018 10:47:06 +0000 Original-Received: from localhost ([127.0.0.1]:37639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekpA2-00089a-9C for submit@debbugs.gnu.org; Sun, 11 Feb 2018 05:47:06 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:20562 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ekpA1-00089S-GH for 30393@debbugs.gnu.org; Sun, 11 Feb 2018 05:47:05 -0500 Original-Received: (qmail 52324 invoked by uid 3782); 11 Feb 2018 10:47:04 -0000 Original-Received: from acm.muc.de (p548C70D3.dip0.t-ipconnect.de [84.140.112.211]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 11 Feb 2018 11:47:02 +0100 Original-Received: (qmail 5025 invoked by uid 1000); 11 Feb 2018 10:36:10 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143133 Archived-At: Hello, Stefan. On Sat, Feb 10, 2018 at 09:58:55 -0500, Stefan Monnier wrote: > > I'm not sure, but I think there's a danger of a recursive loop, > Definitely. > > should a major mode use a hook in syntax-ppss to calculate syntax-table > > properties, > You mean when a major mode sets syntax-propertize-function, right? > > and that hook call forward-comment. > The principle I tried to follow to avoid inf-loop is that each > recursive-invocation of syntax-ppss should be on a strictly smaller > buffer position. > Another principle is that syntax-propertize moves > syntax-propertize--done before calling syntax-propertize-function, so > similarly each recursive invocation of syntax-propertize would have to > be a strictly greater buffer position. > So in a large buffer, this can recurse faily deep, but it shouldn't be > able to recurse infinitely. > This said, in practice I haven't bumped into this problem yet, so > if/when it shows up, we'll see how it should be fixed. OK, but I suspect in practice, this would be impossible to debug for lack of reproducibility. Another definite bug is that the syntax-ppss cache is not flushed when the syntax-table is changed, whether with set-syntax-table or modify-syntax-entry. This is critical, now that primitives depend on this cache. Would you please fix this, Stefan. Thanks! > Stefan -- Alan Mackenzie (Nuremberg, Germany).