[Top][All Lists]

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

Re: /srv/bzr/emacs/trunk r101338: * lisp/emacs-lisp/syntax.el (syntax-pp

From: Stefan Monnier
Subject: Re: /srv/bzr/emacs/trunk r101338: * lisp/emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch
Date: Fri, 14 Feb 2014 11:53:48 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> My line of reasoning was that since fontification happens on the
> display engine level, we need to have a way to call a different
> fontification function for different portions of text.  And similarly
> with indentation and other mode-specific behavior.

And all of those are done in Elisp, so there's no need for C-level changes.

>> What we need instead is some conventions that major modes need to
>> follow to play well in things like mmm-mode or mumamo.
> Like what?

Like "font-lock-keywords can only look before/after the provided region
boundaries by calling special functions".

> Examples, please: which conventions are those?  There's almost no code
> in Emacs that ignores the buffer restrictions (everything uses BEGV
> and ZV).

That's not the issue.  The issue is that code can misbehave if it is
prevented from seeing some of the "outer" text.  Narrowing is used
sufficiently rarely that we don't see it too often, but such problems do
occur already with narrowing.

> So I think these are quite important, and we should support them
> reasonably well, not through kludges.

We violently agree.


reply via email to

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