bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30393: 24.4; cperl-mode: indentation failure


From: Stefan Monnier
Subject: bug#30393: 24.4; cperl-mode: indentation failure
Date: Sat, 10 Feb 2018 09:58:55 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> 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





reply via email to

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