emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/font-lock.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/font-lock.el
Date: Fri, 30 Dec 2005 04:38:53 +0000

Index: emacs/lisp/font-lock.el
diff -u emacs/lisp/font-lock.el:1.288 emacs/lisp/font-lock.el:1.289
--- emacs/lisp/font-lock.el:1.288       Thu Dec 22 16:09:32 2005
+++ emacs/lisp/font-lock.el     Fri Dec 30 04:38:52 2005
@@ -1507,6 +1507,13 @@
 `font-lock-keywords' doc string.
 If REGEXP is non-nil, it means these keywords are used for
 `font-lock-keywords' rather than for `font-lock-syntactic-keywords'."
+  (if (not font-lock-set-defaults)
+      ;; This should never happen.  But some external packages sometimes
+      ;; call font-lock in unexpected and incorrect ways.  It's important to
+      ;; stop processing at this point, otherwise we may end up changing the
+      ;; global value of font-lock-keywords and break highlighting in many
+      ;; other buffers.
+      (error "Font-lock trying to use keywords before setting them up"))
   (if (eq (car-safe keywords) t)
       keywords
     (setq keywords




reply via email to

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