Commit af3d4246 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(font-lock-compile-keywords): Signal an error when

font-lock-set-defaults hasn't been called.
parent b5154364
2005-12-29 Stefan Monnier <monnier@iro.umontreal.ca>
* font-lock.el (font-lock-compile-keywords): Signal an error when
font-lock-set-defaults hasn't been called.
2005-12-29 Luc Teirlinck <teirllm@auburn.edu> 2005-12-29 Luc Teirlinck <teirllm@auburn.edu>
   
* subr.el (noreturn, 1value): Doc fixes. * subr.el (noreturn, 1value): Doc fixes.
...@@ -12,15 +17,13 @@ ...@@ -12,15 +17,13 @@
* textmodes/bibtex.el (bibtex-entry-type-whitespace) * textmodes/bibtex.el (bibtex-entry-type-whitespace)
(bibtex-entry-type-str, bibtex-empty-field-re) (bibtex-entry-type-str, bibtex-empty-field-re)
(bibtex-search-backward-string, bibtex-preamble-prefix) (bibtex-search-backward-string, bibtex-preamble-prefix)
(bibtex-search-entry, bibtex-enclosing-entry-maybe-empty-head): (bibtex-search-entry, bibtex-enclosing-entry-maybe-empty-head): Remove.
Removed.
(bibtex-any-valid-entry-type): New variable. (bibtex-any-valid-entry-type): New variable.
(bibtex-parse-field-name): Simplify. (bibtex-parse-field-name): Simplify.
(bibtex-parse-string, bibtex-search-forward-string): New arg (bibtex-parse-string, bibtex-search-forward-string): New arg empty-key.
empty-key.
(bibtex-preamble-prefix): Include left delimiter. (bibtex-preamble-prefix): Include left delimiter.
(bibtex-search-forward-field, bibtex-search-backward-field): Allow (bibtex-search-forward-field, bibtex-search-backward-field):
unbounded search past entry boundaries (required by bibtex-pop). Allow unbounded search past entry boundaries (required by bibtex-pop).
(bibtex-text-in-field-bounds): Use push. (bibtex-text-in-field-bounds): Use push.
(bibtex-text-in-field): Do not use bibtex-narrow-to-entry. (bibtex-text-in-field): Do not use bibtex-narrow-to-entry.
(bibtex-parse-preamble, bibtex-valid-entry) (bibtex-parse-preamble, bibtex-valid-entry)
...@@ -35,8 +38,8 @@ ...@@ -35,8 +38,8 @@
(bibtex-pop): Use bibtex-beginning-of-entry and (bibtex-pop): Use bibtex-beginning-of-entry and
bibtex-end-of-entry to initiate the search. Insert empty field if bibtex-end-of-entry to initiate the search. Insert empty field if
we found ourselves. we found ourselves.
(bibtex-print-help-message): New args field and comma. Handle (bibtex-print-help-message): New args field and comma.
entry keys. Handle entry keys.
(bibtex-make-field): Use bibtex-beginning-of-entry. (bibtex-make-field): Use bibtex-beginning-of-entry.
(bibtex-end-of-entry): Use bibtex-valid-entry. Recognize any (bibtex-end-of-entry): Use bibtex-valid-entry. Recognize any
invalid entry. invalid entry.
...@@ -51,8 +54,7 @@ ...@@ -51,8 +54,7 @@
(bibtex-fill-field): Simplify. (bibtex-fill-field): Simplify.
(bibtex-fill-entry): Use bibtex-beginning-first-field and (bibtex-fill-entry): Use bibtex-beginning-first-field and
bibtex-parse-field. bibtex-parse-field.
(bibtex-convert-alien): Do not wait before calling (bibtex-convert-alien): Do not wait before calling bibtex-validate.
bibtex-validate.
(bibtex-complete): Use bibtex-parse-preamble. (bibtex-complete): Use bibtex-parse-preamble.
   
2005-12-29 Nick Roberts <nickrob@snap.net.nz> 2005-12-29 Nick Roberts <nickrob@snap.net.nz>
...@@ -68,8 +70,7 @@ ...@@ -68,8 +70,7 @@
   
2005-12-28 Bill Wohler <wohler@newt.com> 2005-12-28 Bill Wohler <wohler@newt.com>
   
* simple.el (mh-e-user-agent): Move to mh-e/mh-comp.el and * simple.el (mh-e-user-agent): Move to mh-e/mh-comp.el and autoload.
autoload.
   
2005-12-28 Stefan Monnier <monnier@iro.umontreal.ca> 2005-12-28 Stefan Monnier <monnier@iro.umontreal.ca>
   
......
...@@ -1507,6 +1507,13 @@ Here each COMPILED is of the form (MATCHER HIGHLIGHT ...) as shown in the ...@@ -1507,6 +1507,13 @@ Here each COMPILED is of the form (MATCHER HIGHLIGHT ...) as shown in the
`font-lock-keywords' doc string. `font-lock-keywords' doc string.
If REGEXP is non-nil, it means these keywords are used for If REGEXP is non-nil, it means these keywords are used for
`font-lock-keywords' rather than for `font-lock-syntactic-keywords'." `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) (if (eq (car-safe keywords) t)
keywords keywords
(setq keywords (setq keywords
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment