summaryrefslogtreecommitdiff
path: root/lisp/font-lock.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2006-01-03 02:15:28 +0000
committerKaroly Lorentey <lorentey@elte.hu>2006-01-03 02:15:28 +0000
commitd62d1e4c69c94571780f29efb7b63274b76bae36 (patch)
treec8fe42962279bfe6a99ba3de63805c549cd31f2a /lisp/font-lock.el
parentb4c0300a21486d95f5abbd8f80a8be6785523862 (diff)
parent73d80331d1ff6b8979fb4b3e0fac0832653bf581 (diff)
downloademacs-d62d1e4c69c94571780f29efb7b63274b76bae36.tar.gz
Merged from miles@gnu.org--gnu-2005 (patch 682)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-682 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-490
Diffstat (limited to 'lisp/font-lock.el')
-rw-r--r--lisp/font-lock.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index de366997a93..7819a0e81cc 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1507,6 +1507,13 @@ Here each COMPILED is of the form (MATCHER HIGHLIGHT ...) as shown in the
`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