[Bug: 21.5-b27] font-lock-fontify-* / infinite loop

Aidan Kehoe kehoea at parhasard.net
Thu Jan 11 18:25:54 EST 2007


 Ar an t-aonú lá déag de mí Eanair, scríobh Wulf C. Krueger: 

 > Hallo Aidan!
 > 
 > "AK" == Aidan Kehoe <kehoea at parhasard.net> writes:
 > 
 >  AK> In a buffer where this happens, what does M-: font-lock-keywords
 >  AK> RET give?  
 > 
 > I was unable to copy from that hellish echo area and couldn't find any
 > information on this problem. Here's a screenshot of the echo area...
 > 
 > http://www.mailstation.de/f-l-k-snp.png
 > 
 >  AK> The error seems to be provoked by the line
 >  AK>    (funcall matcher end)))
 >  AK> in font-lock.el:1870, and if so, we can probably work out where
 >  AK> font-lock-keywords is being set to something not sensible.
 > 
 > I really hope so. Thanks for your help!

Okay, try recompiling and reloading gnus/message.el. If that doesn’t work,
apply the following patch to it and try again; if the patch doesn’t apply,
change the line

  (defun message-font-lock-make-header-matcher (regexp)

to 

  (defmacro message-font-lock-make-header-matcher (regexp)

and recompile and reload. (Note that I haven’t reproduced your problem, so I
can’t be very certain that I have a solution for it :-( )

--- /Sources/packages-current-checked-out/xemacs-packages/gnus/lisp/message.el	2006-04-09 09:43:50.000000000 +0200
+++ message.el	2007-01-12 00:22:54.000000000 +0100
@@ -1265,23 +1265,19 @@
 ;; backward-compatibility alias
 (put 'message-mml-face 'face-alias 'message-mml)
 
-(defun message-font-lock-make-header-matcher (regexp)
-  (let ((form
-	 `(lambda (limit)
-	    (let ((start (point)))
-	      (save-restriction
-		(widen)
-		(goto-char (point-min))
-		(if (re-search-forward
-		     (concat "^" (regexp-quote mail-header-separator) "$")
-		     nil t)
-		    (setq limit (min limit (match-beginning 0))))
-		(goto-char start))
-	      (and (< start limit)
-		   (re-search-forward ,regexp limit t))))))
-    (if (featurep 'bytecomp)
-	(byte-compile form)
-      form)))
+(defmacro message-font-lock-make-header-matcher (regexp)
+  `(lambda (limit)
+     (let ((start (point)))
+       (save-restriction
+	 (widen)
+	 (goto-char (point-min))
+	 (if (re-search-forward
+	      (concat "^" (regexp-quote mail-header-separator) "$")
+	      nil t)
+	     (setq limit (min limit (match-beginning 0))))
+	 (goto-char start))
+       (and (< start limit)
+	    (re-search-forward ,regexp limit t)))))
 
 (defvar message-font-lock-keywords
   (let ((content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)\n?"))
@@ -1314,7 +1310,7 @@
 	    `((,(concat "^\\(" (regexp-quote mail-header-separator) "\\)$")
 	       1 'message-separator))
 	  nil)
-      ((lambda (limit)
+      (,(lambda (limit)
 	 (re-search-forward (concat "^\\("
 				    message-cite-prefix-regexp
 				    "\\).*")



-- 
When I was in the scouts, the leader told me to pitch a tent. I couldn't
find any pitch, so I used creosote.



More information about the XEmacs-Beta mailing list