GNU bug report logs - #5354
Please replace font-lock-fontify-buffer with font-lock-fontify-region in js-mode

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Mon, 11 Jan 2010 16:43:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 5354 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 5354 <at> debbugs.gnu.org
Subject: Re: bug#5354: Please replace font-lock-fontify-buffer with
	font-lock-fontify-region in js-mode
Date: Mon, 11 Jan 2010 12:37:25 -0500
> In `js-mode' there is a call to `font-lock-fontify-buffer' at the end.
> This creates problem for mumamo since it fontifies outside the region
> where js-mode should be applied:

>   (let (font-lock-keywords) ; leaves syntactic keywords intact
>     (font-lock-fontify-buffer))

> Could this please be replaced by

>   (let (font-lock-keywords ; leaves syntactic keywords intact
>         font-lock-extend-region-functions) ;; accept narrowing
>     (font-lock-fontify-region (point-min) (point-max)))

This looks majorly odd (aka difficult to explain/justify from js-mode's
point of view).  I suggest you instead submit a proposal for a new
font-lock function that does what js-mode needs.


        Stefan




This bug report was last modified 15 years and 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.