[Top][All Lists]

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

Re: Why js2-mode in Emacs 23.2?

From: Lennart Borgman
Subject: Re: Why js2-mode in Emacs 23.2?
Date: Mon, 10 Aug 2009 04:55:49 +0200

On Mon, Aug 10, 2009 at 4:47 AM, Stefan Monnier<address@hidden> wrote:
>>   ;; Important to fontify the whole buffer syntactically! If we don't,
>>   ;; then we might have regular expression literals that aren't marked
>>   ;; as strings, which will screw up parse-partial-sexp, scan-lists,
>>   ;; etc. and and produce maddening "unbalanced parenthesis" errors.
>>   ;; When we attempt to find the error and scroll to the portion of
>>   ;; the buffer containing the problem, JIT-lock will apply the
>>   ;; correct syntax to the regular expresion literal and the problem
>>   ;; will mysteriously disappear.
> Yes, this is a general problem.  Basically font-lock-syntactic-keywords
> should be moved out of font-lock into syntax.el (and provide a new
> feature like (syntax-ensure-properties BEG END) to request application
> of those rules) and things like syntax-ppss, indentation, forward-sexp,
> ... should make sure it's applied to the portion of the buffer they
> look at.

I am not sure I understand this, but thinking of it again, could not
Daniel use a font-lock-fontify-region-function that first does a
fontification without keywords (if it is there it is needed).

Or otherwise use what I suggested before.

reply via email to

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