aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-12-30 04:38:52 +0000
committerStefan Monnier2005-12-30 04:38:52 +0000
commitaf3d4246e08b6a8831cdd912486e5458c7fa4643 (patch)
tree41e39f3e5ac7191c1cdcbca7a9c63ca378e781d5
parentb515436461f26f6be42b89612a9a9a8243271516 (diff)
downloademacs-af3d4246e08b6a8831cdd912486e5458c7fa4643.tar.gz
emacs-af3d4246e08b6a8831cdd912486e5458c7fa4643.zip
(font-lock-compile-keywords): Signal an error when
font-lock-set-defaults hasn't been called.
-rw-r--r--lisp/ChangeLog25
-rw-r--r--lisp/font-lock.el7
2 files changed, 20 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c270c7f0bdd..60d329d0b9a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12005-12-29 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * font-lock.el (font-lock-compile-keywords): Signal an error when
4 font-lock-set-defaults hasn't been called.
5
12005-12-29 Luc Teirlinck <teirllm@auburn.edu> 62005-12-29 Luc Teirlinck <teirllm@auburn.edu>
2 7
3 * subr.el (noreturn, 1value): Doc fixes. 8 * subr.el (noreturn, 1value): Doc fixes.
@@ -12,15 +17,13 @@
12 * textmodes/bibtex.el (bibtex-entry-type-whitespace) 17 * textmodes/bibtex.el (bibtex-entry-type-whitespace)
13 (bibtex-entry-type-str, bibtex-empty-field-re) 18 (bibtex-entry-type-str, bibtex-empty-field-re)
14 (bibtex-search-backward-string, bibtex-preamble-prefix) 19 (bibtex-search-backward-string, bibtex-preamble-prefix)
15 (bibtex-search-entry, bibtex-enclosing-entry-maybe-empty-head): 20 (bibtex-search-entry, bibtex-enclosing-entry-maybe-empty-head): Remove.
16 Removed.
17 (bibtex-any-valid-entry-type): New variable. 21 (bibtex-any-valid-entry-type): New variable.
18 (bibtex-parse-field-name): Simplify. 22 (bibtex-parse-field-name): Simplify.
19 (bibtex-parse-string, bibtex-search-forward-string): New arg 23 (bibtex-parse-string, bibtex-search-forward-string): New arg empty-key.
20 empty-key.
21 (bibtex-preamble-prefix): Include left delimiter. 24 (bibtex-preamble-prefix): Include left delimiter.
22 (bibtex-search-forward-field, bibtex-search-backward-field): Allow 25 (bibtex-search-forward-field, bibtex-search-backward-field):
23 unbounded search past entry boundaries (required by bibtex-pop). 26 Allow unbounded search past entry boundaries (required by bibtex-pop).
24 (bibtex-text-in-field-bounds): Use push. 27 (bibtex-text-in-field-bounds): Use push.
25 (bibtex-text-in-field): Do not use bibtex-narrow-to-entry. 28 (bibtex-text-in-field): Do not use bibtex-narrow-to-entry.
26 (bibtex-parse-preamble, bibtex-valid-entry) 29 (bibtex-parse-preamble, bibtex-valid-entry)
@@ -35,8 +38,8 @@
35 (bibtex-pop): Use bibtex-beginning-of-entry and 38 (bibtex-pop): Use bibtex-beginning-of-entry and
36 bibtex-end-of-entry to initiate the search. Insert empty field if 39 bibtex-end-of-entry to initiate the search. Insert empty field if
37 we found ourselves. 40 we found ourselves.
38 (bibtex-print-help-message): New args field and comma. Handle 41 (bibtex-print-help-message): New args field and comma.
39 entry keys. 42 Handle entry keys.
40 (bibtex-make-field): Use bibtex-beginning-of-entry. 43 (bibtex-make-field): Use bibtex-beginning-of-entry.
41 (bibtex-end-of-entry): Use bibtex-valid-entry. Recognize any 44 (bibtex-end-of-entry): Use bibtex-valid-entry. Recognize any
42 invalid entry. 45 invalid entry.
@@ -51,8 +54,7 @@
51 (bibtex-fill-field): Simplify. 54 (bibtex-fill-field): Simplify.
52 (bibtex-fill-entry): Use bibtex-beginning-first-field and 55 (bibtex-fill-entry): Use bibtex-beginning-first-field and
53 bibtex-parse-field. 56 bibtex-parse-field.
54 (bibtex-convert-alien): Do not wait before calling 57 (bibtex-convert-alien): Do not wait before calling bibtex-validate.
55 bibtex-validate.
56 (bibtex-complete): Use bibtex-parse-preamble. 58 (bibtex-complete): Use bibtex-parse-preamble.
57 59
582005-12-29 Nick Roberts <nickrob@snap.net.nz> 602005-12-29 Nick Roberts <nickrob@snap.net.nz>
@@ -68,8 +70,7 @@
68 70
692005-12-28 Bill Wohler <wohler@newt.com> 712005-12-28 Bill Wohler <wohler@newt.com>
70 72
71 * simple.el (mh-e-user-agent): Move to mh-e/mh-comp.el and 73 * simple.el (mh-e-user-agent): Move to mh-e/mh-comp.el and autoload.
72 autoload.
73 74
742005-12-28 Stefan Monnier <monnier@iro.umontreal.ca> 752005-12-28 Stefan Monnier <monnier@iro.umontreal.ca>
75 76
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index ca0848bd561..c05de2bc0b5 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
1507`font-lock-keywords' doc string. 1507`font-lock-keywords' doc string.
1508If REGEXP is non-nil, it means these keywords are used for 1508If REGEXP is non-nil, it means these keywords are used for
1509`font-lock-keywords' rather than for `font-lock-syntactic-keywords'." 1509`font-lock-keywords' rather than for `font-lock-syntactic-keywords'."
1510 (if (not font-lock-set-defaults)
1511 ;; This should never happen. But some external packages sometimes
1512 ;; call font-lock in unexpected and incorrect ways. It's important to
1513 ;; stop processing at this point, otherwise we may end up changing the
1514 ;; global value of font-lock-keywords and break highlighting in many
1515 ;; other buffers.
1516 (error "Font-lock trying to use keywords before setting them up"))
1510 (if (eq (car-safe keywords) t) 1517 (if (eq (car-safe keywords) t)
1511 keywords 1518 keywords
1512 (setq keywords 1519 (setq keywords