From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#30393: 24.4; cperl-mode: indentation failure Date: Sat, 10 Feb 2018 09:58:55 -0500 Message-ID: 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 X-Trace: blaine.gmane.org 1518274717 20620 195.159.176.226 (10 Feb 2018 14:58:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Feb 2018 14:58:37 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 30393@debbugs.gnu.org, Dmitry Gutov , Noam Postavsky To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 10 15:58:32 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 1ekWbR-0003Zk-1t for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Feb 2018 15:58:09 +0100 Original-Received: from localhost ([::1]:51960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekWdS-0005Ub-FU for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Feb 2018 10:00:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekWdL-0005Sk-5L for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2018 10:00:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekWdH-0003lC-Hw for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2018 10:00:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57491) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ekWdH-0003kS-Ck for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2018 10:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ekWdH-00009K-0S for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2018 10:00:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Feb 2018 15:00:02 +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.1518274743464 (code B ref 30393); Sat, 10 Feb 2018 15:00:02 +0000 Original-Received: (at 30393) by debbugs.gnu.org; 10 Feb 2018 14:59:03 +0000 Original-Received: from localhost ([127.0.0.1]:37155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekWcJ-00007Q-9M for submit@debbugs.gnu.org; Sat, 10 Feb 2018 09:59:03 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:34235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekWcG-000070-If for 30393@debbugs.gnu.org; Sat, 10 Feb 2018 09:59:01 -0500 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w1AEwuR2020352; Sat, 10 Feb 2018 09:58:57 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 02F6F66352; Sat, 10 Feb 2018 09:58:55 -0500 (EST) In-Reply-To: <20180210112654.GA4537@ACM> (Alan Mackenzie's message of "Sat, 10 Feb 2018 11:26:54 +0000") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6219=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6219> : inlines <6389> : streams <1778582> : uri <2590354> 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:143098 Archived-At: > 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. Stefan