emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] comment-cache 223d16f 2/3: Apply `comment-depth' text


From: Andreas Röhler
Subject: Re: [Emacs-diffs] comment-cache 223d16f 2/3: Apply `comment-depth' text properties when calling `back_comment'.
Date: Thu, 10 Mar 2016 08:14:35 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.5.0



On 08.03.2016 19:30, Alan Mackenzie wrote:
Hello, Stefan.

On Tue, Mar 08, 2016 at 09:19:46AM -0500, Stefan Monnier wrote:
     Apply `comment-depth' text properties when calling `back_comment'.
FWIW, I think if you want to speed up back_comment, a simpler approach
is to make it use syntax-ppss, which already implements a cache, and
will usually already have the cache filled for you.
My changes might speed up back_comment, but that's not the prime reason
for them.  Rather, I want utterly to expunge all the nonsense about
parens in column 0.  That a high class editor such as Emacs should have
problems with such parens is ludicrous and unacceptable.

Indeed. Thanks making this up again.

Also dropped use of syntax-ppss as not reliable. A cache simply doesn't make sense in this circumstance, as any previous insert might have changed the state.

See inside stuff like

       ;; Use OLD-PPSS if possible and close enough.

or

   syntax-ppss-toplevel-pos

Syntax must precede such notions like toplevel, can't depend on them.



Andreas



reply via email to

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