diff lisp/packages/font-lock.el @ 38:1a767b41a199 r19-15b102

Import from CVS: tag r19-15b102
author cvs
date Mon, 13 Aug 2007 08:54:01 +0200
parents ec9a17fef872
children 56c54cf7c5b6
line wrap: on
line diff
--- a/lisp/packages/font-lock.el	Mon Aug 13 08:53:41 2007 +0200
+++ b/lisp/packages/font-lock.el	Mon Aug 13 08:54:01 2007 +0200
@@ -770,8 +770,10 @@
     (setq font-lock-old-extent nil)))
 
 (defun font-lock-pre-idle-hook ()
-  (if font-lock-old-extent
-      (font-lock-fontify-glumped-region)))
+  (condition-case nil
+      (if font-lock-old-extent
+	  (font-lock-fontify-glumped-region))
+    (error (warn "Error caught in `font-lock-pre-idle-hook'"))))
 
 (defvar font-lock-always-fontify-immediately nil
   "Set this to non-nil to disable font-lock deferral.")
@@ -2261,9 +2263,11 @@
 	       '(2 font-lock-reference-face)
 	       (list (concat
 		      "\\=\\.\\(" java-font-lock-identifier-regexp "\\)")
-		     nil nil '(1 (if (= (char-after (match-end 0)) ?.)
-				     'font-lock-reference-face
-				   'font-lock-type-face))))
+		     nil nil '(1 (let ((c (char-after (match-end 0))))
+				   (if (and (characterp c)
+					    (= c ?.))
+				       'font-lock-reference-face
+				     'font-lock-type-face)))))
 
 	 ;; Constructors:
 	 (list (concat