emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: fontification loop


From: Stefan Monnier
Subject: Re: fontification loop
Date: Mon, 25 Sep 2006 11:00:17 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> I just caught Emacs hogging the CPU with endless
> redisplay/fontification.  The following code triggers it for me:

> --8<---------------cut here---------------start------------->8---
> (progn
>   (switch-to-buffer "*fontification loop*")
>   (emacs-lisp-mode)
>   (while (< (point) (floor (* (sqrt 2) jit-lock-chunk-size)))
>     (insert "\nfoo\nbar\nbaz"))
>   (put-text-property (- (point-max) 5) (point-max) 'invisible t))
> --8<---------------cut here---------------end--------------->8---

> If emacs crashed, and you have the emacs process in the gdb debugger,
> please include the output from the following gdb commands:
>     `bt full' and `xbacktrace'.
> If you would like to further debug the crash, please read the file
> /home/andreas/ext/emacs/etc/DEBUG for instructions.

I can't reproduce it here.  Does the patch below help?


        Stefan


--- jit-lock.el 14 sep 2006 11:00:11 -0400      1.56
+++ jit-lock.el 25 sep 2006 10:54:29 -0400      
@@ -407,7 +407,8 @@
   "Fontify in buffer BUF from START to END."
   (with-current-buffer buf
     (with-buffer-prepared-for-jit-lock
-     (put-text-property start end 'fontified t))))
+     (when (setq end (text-property-not-all start end 'fontified nil))
+       (put-text-property start end 'fontified nil)))))
 
 
 




reply via email to

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