emacs-devel
[Top][All Lists]
Advanced

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

Re: generic buffer parsing cache data


From: martin rudalics
Subject: Re: generic buffer parsing cache data
Date: Sun, 01 Jul 2007 14:38:24 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> I propose to add something generic.  For instance, Python mode needs to
> know indentation level of blocks.  It seems that `syntax-ppss` doesn't
> return it at all.  And adding everything that might ever be needed by
> some XYZ mode seems counter-productive and complicates an already complex
> function and its return value.
>
> I just mean that major modes can have needs beyond that suited by
> `syntax-ppss`.  And as far as I can see, they can either parse half of
> the buffer each time they need something, or invent some ad-hoc custom
> code for caching such data.

Like `c-state-cache'.  Well, `syntax-ppss' can only do whatever
`parse-partial-sexp' does.  Occasionally, that's not even sufficient for
the Elisp case (look how `lisp-font-lock-syntactic-face-function'
strives for detecting doc-strings).  I'd appreciate if you came up with
something more "generic" (if you just could give a clear description of
that term).





reply via email to

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