emacs-devel
[Top][All Lists]
Advanced

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

Re: Why js2-mode in Emacs 23.2?


From: Daniel Colascione
Subject: Re: Why js2-mode in Emacs 23.2?
Date: Sun, 9 Aug 2009 20:46:39 -0400

On Aug 9, 2009, at 8:17 PM, Lennart Borgman wrote:
Could not JIT-lock do a second pass?

Is there another way to solve the problem? Can mumamo tell espresso to
ignore certain parts of the buffer?

Well, it does, but espresso kind of ignores that ... ;-)

Just telling it where to scan will however not help since
espresso-mode will be called every time a user enters a chunk with
espresso-mode.

A second pass when? The problem is that functions that have nothing to do with fontification operate improperly unless correct text properties are attached to certain bits of the buffer.

Consider the regular expression /}/. syntactic-keywords are used to mark the whole expression as a string. If forward-sexp encounters that expression before the expression is marked as a string, then it'll interpret the '}' incorrectly. When the user actually enters a '}', we fontify it correctly. However, when we first start up, we need to fonyify the whole buffer so that we don't trip over one of these regular expressions if we look at it before jit-lock gets around to it.

Can espresso just perform the regexp-marking scan 1) on only the region given to it by mumamo, and 2) only once, with some kind of indication given by mumamo of whether we're seen this particular chunk before?


As for define-derived-mode: nope, espresso-mode doesn't use that.

It is a minor change but will help keeping it upto date later.

So just use define-derived-mode to inherit from fundamental-mode?






reply via email to

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