[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Excessive refontification when setting jit-lock-context-unfontify-po
From: |
Stefan Monnier |
Subject: |
Re: Excessive refontification when setting jit-lock-context-unfontify-pos |
Date: |
Sun, 29 Apr 2007 20:23:22 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.97 (gnu/linux) |
>> (run-with-timer 0 nil 'jit-lock-force-redisplay
>> (current-buffer) start orig-start))
>>
>> So in your case you can either use
>> jit-lock-after-change-extend-region-functions; or you can use a similar
>> run-with-timer in your font-lock-fontify-region-function. If you look at
>> jit-lock-force-redisplay, you'll see that it should not cause infinite
>> looping because it only causes redisplay (like C-l would) but not
>> re-highlighting.
> By the way, `jit-lock-force-redisplay' uses the macro
> `with-buffer-prepared-for-jit-lock' which is only defined when
> jit-lock.el is being compiled. Is there a way to use that macro from
> outside of jit-lock.el? A `(require 'jit-lock)' does not help.
It'd probably be better to not bother with the "feature" of only
defining that macro when compiling. But in the mean time (and to work with
older Emacsen), you may want to (eval-when-compile (load "jit-lock.el")).
Yuck :-(
Stefan
PS: Of course you can also use your own copy of the macro.
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, (continued)
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Ralf Angeli, 2007/04/24
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Stefan Monnier, 2007/04/24
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Ralf Angeli, 2007/04/24
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Stefan Monnier, 2007/04/25
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Ralf Angeli, 2007/04/25
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Stefan Monnier, 2007/04/25
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Ralf Angeli, 2007/04/27
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Stefan Monnier, 2007/04/27
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Ralf Angeli, 2007/04/27
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Ralf Angeli, 2007/04/28
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos,
Stefan Monnier <=
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Ralf Angeli, 2007/04/30
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, martin rudalics, 2007/04/25
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, Ralf Angeli, 2007/04/27
- Re: Excessive refontification when setting jit-lock-context-unfontify-pos, martin rudalics, 2007/04/25