Commit graph

308 commits

Author SHA1 Message Date
Stefan Monnier
efa0c0ef0b (font-lock-after-change-function): Refontify next line as well if end is at BOL.
(font-lock-extend-jit-lock-region-after-change): Be more careful to
only extend the region as much as needed.
2006-09-28 20:02:45 +00:00
Richard M. Stallman
9595af7e44 (font-lock-compile-keywords): Allow value of
syntax-begin-function to enable paren-column-0 highlighting.
2006-09-24 20:37:58 +00:00
Richard M. Stallman
533047c2e5 (font-lock-compile-keywords): Rename optional arg to SYNTACTIC-KEYWORDS
and reverse the sense.  All callers changed.
2006-09-16 17:52:32 +00:00
Stefan Monnier
3d93bda589 (font-lock-extend-region-wholelines): Fix up typo.
Reported by Martin Rudalics <rudalics@gmx.at>.
2006-08-17 03:19:55 +00:00
Stefan Monnier
10412e6312 (font-lock-extend-jit-lock-region-after-change): Better comment. 2006-08-07 18:24:25 +00:00
Stefan Monnier
65c986aa94 (font-lock-extend-jit-lock-region-after-change): Add docstring. 2006-08-07 17:47:55 +00:00
Stefan Monnier
1402611cf2 (font-lock-extend-after-change-region-function,
font-lock-extend-region-functions,
font-lock-extend-jit-lock-region-after-change): Better comments.
2006-08-07 17:42:36 +00:00
Stefan Monnier
05a1066ff0 (font-lock-beg, font-lock-end, font-lock-extend-region-functions): New vars.
(font-lock-extend-region-multiline)
(font-lock-extend-region-wholelines): New functions.
(font-lock-default-fontify-region): Use them.
(font-lock-extend-jit-lock-region-after-change): Only round up
if font-lock-default-fontify-region will do it as well.
2006-08-03 07:14:39 +00:00
Stefan Monnier
ab0dd59ce7 (font-lock-extend-after-change-region-function):
Rename from font-lock-extend-region-function.
(font-lock-extend-region): Remove by inlining at call sites.
(font-lock-after-change-function): Don't needlessly round up to a whole
number of lines.
(font-lock-extend-jit-lock-region-after-change): Be more careful about
the boundary conditions and the interactions between the various ways
to extend the region.
2006-08-03 05:42:53 +00:00
Stefan Monnier
2821e1b6f8 (font-lock-extend-region-function, font-lock-extend-region):
Move from font-core.el.  Simplify.
2006-08-01 19:09:11 +00:00
Stefan Monnier
4cffd22137 (font-lock-extend-jit-lock-region-after-change): New fun.
(font-lock-turn-on-thing-lock): Use it.
2006-08-01 18:58:18 +00:00
Masatake YAMATO
8c8b116446 (cpp-font-lock-keywords-source-directives): Addded
"warning" and "import".
(cpp-font-lock-keywords): Added "warning".
2006-05-09 04:07:25 +00:00
Stefan Monnier
4ffc92c2d8 * font-lock.el (font-lock-lines-before): Delete variable, subsumed by
the new extend-region feature.
(font-lock-after-change-function): Update correspondingly.
* jit-lock.el (jit-lock-after-change): Update correspondingly.
* progmodes/grep.el (font-lock-lines-before): Don't disable.
* modes.texi (Region to Fontify): Remove font-lock-lines-before.
2006-03-15 22:26:09 +00:00
Alan Mackenzie
ef0083218d * font-core.el: New function/variable
font-lock-extend-region\(-function\)?.

* font-lock.el (font-lock-after-change-function): Call
font-lock-extend-region.  Obey font-lock-lines-before.
(font-lock-default-fontify-region): Remove reference to
font-lock-lines-before.

* jit-lock.el (jit-lock-after-change): Call
font-lock-extend-region.  Obey font-lock-lines-before.
2006-03-14 18:23:47 +00:00
Eli Zaretskii
b50f58d55f (lisp-font-lock-keywords-2): Quote "]"s in regexps when they have no
special meaning.
2006-03-03 12:18:17 +00:00
Thien-Thi Nguyen
317921ec18 (lisp-font-lock-keywords-2):
Recognize "& keywords" only at word boundaries.
2006-01-24 13:38:07 +00:00
Richard M. Stallman
588fe8bc0a (lisp-font-lock-keywords-1): Minor rearrangement. 2006-01-17 14:32:16 +00:00
Masatake YAMATO
4076cbf66c 2006-01-06 Masatake YAMATO <jet@gyve.org>
* font-lock.el (cpp-font-lock-keywords): Font lock keywords for
	C preprocessor forward ported from GNU Emacs 21.2.

	* progmodes/asm-mode.el (asm-font-lock-keywords): Use
	`cpp-font-lock-keywords'.

	* progmodes/ld-script.el (ld-script-font-lock-keywords): Ditto.

	* progmodes/ld-script.el (auto-mode-alist): Use \\> instead
	of $ for "\\.ld[s]?".
2006-01-11 14:29:44 +00:00
Stefan Monnier
1c360af385 (font-lock-fontify-buffer, font-lock-fontify-region): Make sure we've setup
font-lock's vars.  It may influence which function we then call.
(font-lock-default-fontify-buffer): Don't bother calling set-defaults
here since it's too late anyway.
2006-01-03 17:00:35 +00:00
Stefan Monnier
af3d4246e0 (font-lock-compile-keywords): Signal an error when
font-lock-set-defaults hasn't been called.
2005-12-30 04:38:52 +00:00
Stefan Monnier
e0be77f6d8 (font-lock-default-fontify-buffer): Try and set-defaults even if font-lock-mode
is non-nil since it may be t without having turned on font-lock-mode-internal.
(font-lock-choose-keywords): Minor optimization.
(font-lock-add-keywords, font-lock-remove-keywords, font-lock-set-defaults):
Don't call make-local-variable on a variable that we know to already be local.
2005-12-22 16:09:32 +00:00
Luc Teirlinck
7667fa3a2d (font-lock): Add tags to the links in the defgroup. 2005-12-19 23:18:17 +00:00
Romain Francoise
28aa81489d (font-lock-keywords-alist): Rename append' to how'.
(font-lock-add-keywords, font-lock-update-removed-keyword-alist):
(font-lock-remove-keywords): Likewise.
2005-12-14 11:21:24 +00:00
Juri Linkov
140adc83fa (lisp-font-lock-keywords-1): Add define-global-minor-mode. 2005-12-04 02:31:58 +00:00
Luc Teirlinck
407f5edd35 Throw error if facemenu is not loaded to prevent accidental change of
loading order in loadup.el.  (Suggested by RMS.)
2005-11-29 05:03:21 +00:00
Juri Linkov
a4deefedf3 (font-lock-faces): Rename this defgroup from
`font-lock-highlighting-faces'.
(font-lock-comment-face, font-lock-comment-delimiter-face)
(font-lock-string-face, font-lock-doc-face)
(font-lock-keyword-face, font-lock-builtin-face)
(font-lock-function-name-face, font-lock-variable-name-face)
(font-lock-type-face, font-lock-constant-face)
(font-lock-warning-face, font-lock-negation-char-face)
(font-lock-preprocessor-face)
(font-lock-regexp-grouping-backslash)
(font-lock-regexp-grouping-construct): Rename :group from
`font-lock-highlighting-faces' to `font-lock-faces'.
2005-11-17 07:16:45 +00:00
Dan Nicolaescu
d60b49ac4e * font-lock.el: Don't deal with font-lock-face-attributes here,
move the code ...

* startup.el (command-line): ... here. Use face-spec-set instead
of custom-declare-face.

* faces.el (face-spec-set): Reset the face if spec is not nil.
2005-11-05 07:29:45 +00:00
Dan Nicolaescu
11ec76b7ea (font-lock-warning-face): Use the more vivid red1,
not red.
2005-11-03 22:29:43 +00:00
Dan Nicolaescu
c94f08ff7a * loadup.el: Load emacs-lisp/syntax, font-lock and jit-lock so
that global-font-lock-mode can be enabled by default.

* font-lock.el (font-lock-keywords, font-lock-mode-internal)
(font-lock-add-keywords, font-lock-remove-keywords)
(font-lock-fontify-buffer): Remove autoload cookies.

* jit-lock.el (jit-lock-register): Likewise.

* emacs-lisp/syntax.el (syntax-ppss): Likewise.

* puresize.h (BASE_PURESIZE): Increment to 1170000.
2005-10-31 16:41:15 +00:00
Andreas Schwab
9f40e1d51e (lisp-font-lock-keywords-2): Add eval-at-startup
and eval-next-after-load.
2005-10-23 09:45:44 +00:00
Stefan Monnier
5ae158bf21 (font-lock-default-fontify-region): Check the multiline
property independently from the font-lock-multiline variable.
2005-10-21 17:41:54 +00:00
Stefan Monnier
d55c4199f7 (font-lock-compile-keywords): Add a help-echo to the
warning face on open-paren-in-column-0.
2005-10-21 06:29:52 +00:00
Richard M. Stallman
9bab4985d9 (font-lock-syntactic-keywords, font-lock-keywords): Doc fixes. 2005-10-10 03:25:34 +00:00
Stefan Monnier
5d4247d31a (font-lock-default-fontify-region): Don't unconditionally add a line, since
the after-change-function already did it.
2005-09-19 12:08:07 +00:00
Richard M. Stallman
595f66af31 (font-lock-keywords): Add autoload. 2005-09-12 15:37:44 +00:00
Richard M. Stallman
59442c8050 (font-lock-support-mode): Doc fix. 2005-09-09 01:15:25 +00:00
Stefan Monnier
a9efeb1df8 (fast-lock, lazy-lock) <defgroup>: Remove.
(font-lock-lines-before): Change default to being inactive.
(font-lock-after-change-function): Don't handle font-lock-lines-before here.
(font-lock-default-fontify-region): Handle it here.
2005-09-01 14:04:03 +00:00
Thien-Thi Nguyen
0d30b33766 Update years in copyright notice; nfc. 2005-08-06 22:13:43 +00:00
Juri Linkov
d8d5c28c13 (font-lock-regexp-grouping-backslash): Don't
inherit from escape-glyph (use bold for all cases).
2005-07-19 11:31:31 +00:00
Stefan Monnier
8a08764f7a (font-lock-fontify-keywords-region): Avoid inf-loops
when the matched text is empty.
2005-07-13 04:39:14 +00:00
Lute Kamstra
086add1519 Update FSF's address. 2005-07-04 23:32:44 +00:00
Eli Zaretskii
112abe2467 (font-lock-regexp-grouping-construct): Fix the bogus name from
the last change.
2005-07-03 05:00:31 +00:00
Eli Zaretskii
9ad5e4d4ee (font-lock-regexp-grouping-backslash): Rename from
font-lock-regexp-backslash.  Doc fix.
(font-lock-regexp-backslash-grouping-construct): Rename from
font-lock-regexp-backslash-construct.  Doc fix.
(lisp-font-lock-keywords-2): Fix highlighting of ELisp regexp
grouping constructs.
2005-07-02 09:40:42 +00:00
Stefan Monnier
56d8206be3 (save-buffer-state): Use `declare'. 2005-06-29 08:19:17 +00:00
Juanma Barranquero
97f38995a5 (font-lock-keywords): Fix spelling in docstrings. 2005-06-16 16:09:42 +00:00
Luc Teirlinck
dd314c0fc3 (font-lock-add-keywords): Doc fix. 2005-06-06 21:32:57 +00:00
Juri Linkov
c711faac0a (font-lock-regexp-backslash)
(font-lock-regexp-backslash-construct): New faces.
(lisp-font-lock-keywords-2): Use new faces.  Match `?:' only
after `('.  Add `while-no-input' to control structures.
2005-06-06 12:02:35 +00:00
Luc Teirlinck
1224500961 (font-lock-set-defaults): Fix omission in last change. 2005-06-05 03:37:59 +00:00
Luc Teirlinck
bed8843851 (font-lock-add-keywords): Doc fix. Comment change.
(font-lock-remove-keywords): Doc fix.
(font-lock-mode-major-mode): Compiler defvar.
(font-lock-set-defaults): Use `font-lock-mode-major-mode '.
2005-06-04 22:23:44 +00:00
Richard M. Stallman
a159470388 (font-lock-fontify-syntactically-region):
Pass t for GREEDY to looking-back.
2005-05-29 08:39:40 +00:00