* bug#5354: Please replace font-lock-fontify-buffer with font-lock-fontify-region in js-mode
@ 2010-01-11 16:42 Lennart Borgman
2010-01-11 17:37 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman @ 2010-01-11 16:42 UTC (permalink / raw)
To: emacs-pretest-bug
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)))
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#5354: Please replace font-lock-fontify-buffer with font-lock-fontify-region in js-mode
2010-01-11 16:42 bug#5354: Please replace font-lock-fontify-buffer with font-lock-fontify-region in js-mode Lennart Borgman
@ 2010-01-11 17:37 ` Stefan Monnier
2010-01-11 21:32 ` Lennart Borgman
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2010-01-11 17:37 UTC (permalink / raw)
To: Lennart Borgman; +Cc: 5354
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#5354: Please replace font-lock-fontify-buffer with font-lock-fontify-region in js-mode
2010-01-11 17:37 ` Stefan Monnier
@ 2010-01-11 21:32 ` Lennart Borgman
0 siblings, 0 replies; 3+ messages in thread
From: Lennart Borgman @ 2010-01-11 21:32 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 5354
On Mon, Jan 11, 2010 at 6:37 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> 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.
Thanks, you are right. Looking at it again I realize I can of course
instead change font-lock-fontify-buffer-function in mumamo. So I did
that.
Please close this bug. Sorry for the trouble and thanks for the help.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-11 21:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 16:42 bug#5354: Please replace font-lock-fontify-buffer with font-lock-fontify-region in js-mode Lennart Borgman
2010-01-11 17:37 ` Stefan Monnier
2010-01-11 21:32 ` Lennart Borgman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.