emacs-devel
[Top][All Lists]
Advanced

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

Re: Problems with syntax-ppss


From: Stefan Monnier
Subject: Re: Problems with syntax-ppss
Date: Mon, 07 Apr 2008 12:43:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>>> Would it not be a good idea to (i) redefine syntax-ppss as calculating
>>> the syntax from BOB (as opposed to (point-min));
>> 
>> That's already what it does, when it can.  Maybe it could be improved as
>> follows: signal an error if it needs to recompute from (point-min) and
>> (point-min) is not the beginning of the buffer, unless the caller sets
>> a `syntax-ppss-narrowed-is-ok' variable (for use in modes like Info and
>> Rmail).  Maybe that variable should be shared with font-lock-dont-widen.

> Until I had to start reading the code I thought that font-lock-dont-widen
> already took care of this. I think there have to be a way to tell
> syntax-ppss not to widen otherwise I can't see what purpose
> font-lock-dont-widen could have (but I guess I am missing something there?).

All I meant is that the two variables would probably always be set
together: a mode that requires font-lock-dont-widen would also need
syntax-ppss-narrowed-is-ok, so it might be better to link them somehow.


        Stefan




reply via email to

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