Subject: bug#22884: 25.0.92; C/l mode editing takes waaaayy too long

From: Eli Zaretskii <[email-masked]>
Date: Fri, 04 Mar 2016 10:32:56 +0200

> Date: Thu, 3 Mar 2016 23:18:23 +0000
> Cc: [email-masked], [email-masked]
> From: Alan Mackenzie <[email-masked]>
> 
> Would it be practicable to mark comments with text properties?  Say, a
> property called `comment-depth' which would be either nil (meaning
> currently unknown), 0 (definitely not in a comment), 1 (definitely in a
> comment), 2 (in a nested comment), 3, ...... ?  That way we could always
> scan comments in the forwards direction (which is easy) - if we need to
> go backwards over a comment without the property, we can just go back to
> a known point and scan forward.

I don't see any immediate problems with this.  But doesn't creating
these properties require to solve the same problem with the specific
cases we are discussing now?

> Or would this just overwhelm the text property mechanism?

No, I don't think it should.  Text properties scale reasonably well.
And we already have the same with faces (since comments have a
specific face), don't we?