emacs-devel
[Top][All Lists]
Advanced

[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: Dmitry Gutov
Subject: Re: /srv/bzr/emacs/trunk r101338: * lisp/emacs-lisp/syntax.el (syntax-ppss): More sanity check to catch
Date: Fri, 14 Feb 2014 16:08:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> I agree that being able to support portions of a buffer that specify
> their own major mode is an important feature.  I'm just saying that we
> need a suitable infrastructure for that, instead of trying to exploit
> unrelated features, which seem like "a good idea".

The first hint of a "suitable infrastructure" would be the adaptation of
`syntax-ppss'. Where the information about region boundaries would come
from, if not from mmm-mode? Text properties? Overlay properties? Where
would they come from, if not from mmm-mode or similar package?

I guess adapting the default font-lock-fontify-region function and
syntax-propertize to be aware of them would be good, but that could be
done later.

> Yes, something like that.  Basically, somehow present to major-mode
> features only a portion of the buffer (e.g., by narrowing internally).

This doest address primary mode regions, which a) need to see the
previous chunks of the same mode, b) (for most functions) ignore the
chunks of the submodes. But not for indentation: in some (!) mode
combinations, the contents of submode regions influence indentation in
the primary regions, namely in JSP, ERB and similar templates.



reply via email to

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