1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-19 04:10:18 -08:00
Commit graph

171 commits

Author SHA1 Message Date
Eli Zaretskii
dcc70c380e (font-lock-mode): Doc fix. 2001-01-23 11:23:07 +00:00
Gerd Moellmann
111c181ec1 (font-lock-default-fontify-region): Fix last
change.
2001-01-19 13:51:25 +00:00
Gerd Moellmann
f926102066 (font-lock-multiline): Default to nil.
(font-lock-default-fontify-region): If font-lock-multiline is
nil, don't check the property `font-lock-multiline'.
2001-01-19 13:32:08 +00:00
Kenichi Handa
31b482ee84 (c-font-lock-extra-types): Add "Lisp_Object". 2001-01-10 12:28:06 +00:00
Stefan Monnier
724a330fe4 (font-lock-default-fontify-region):
Include the terminating \n (off-by-one error).
(font-lock-set-defaults): Use dolist.
2000-12-07 11:59:38 +00:00
Gerd Moellmann
1bc7654adc (java-keywords): Add MATCH-HIGHLIGHT part for
javadoc tags.
2000-11-20 16:17:34 +00:00
Stefan Monnier
1c172af45c (font-lock-*-face) <defvar>: Move.
(font-lock-defaults-alist): Mark obsolete.
(font-lock-mode, font-lock-mode-hook) <defvar>: Remove.
(font-lock-mode): Use define-minor-mode.
(font-lock-support-mode): Tweak type to default to jit-lock-mode.
(font-lock-turn-off-thing-lock): Be more explicit.
(font-lock-apply-syntactic-highlight): Use string-to-syntax after eval.
(font-lock-syntactic-face-function): New var.
(font-lock-fontify-syntactically-region): Use it.
(font-lock-doc-face): New.
2000-11-10 00:57:45 +00:00
Stefan Monnier
ba22aeff64 (font-lock-buffers): Remove.
(font-lock-global-modes): Define with easy-mmode-define-global-mode.
(font-lock-change-major-mode): Remove.
(turn-on-font-lock-if-enabled): Only apply to the current buffer.
(font-lock-default-fontify-region): Extend the multiline
fontification to whole lines.
(font-lock-fontify-anchored-keywords)
(font-lock-fontify-keywords-region): If matching just one
line (with \n) only mark the \n as multiline.
2000-11-03 04:32:33 +00:00
Eli Zaretskii
8379c86876 (font-lock-comment-face): Define a separate default
for dark-background tty's.
2000-10-17 12:00:37 +00:00
Stefan Monnier
5299cb8e97 (font-lock-syntactic-keywords): Fix docstring. 2000-10-15 22:13:01 +00:00
Stefan Monnier
c0a6a9fe28 (font-lock-syntactically-fontified): New var.
(font-lock-fontify-syntactic-keywords-region): Use it.
(font-lock-mode): Fix docstring.  Don't need make-local-hook anymore.
2000-10-15 04:51:57 +00:00
Miles Bader
86b7fcbb0c (font-lock-comment-face): Change dark-background,
color, non-tty, default to `chocolate1'.
2000-10-15 02:31:42 +00:00
Stefan Monnier
fd612dd946 (font-lock-defaults): Make buffer-local.
(font-lock-turn-on-thing-lock): Use jit-lock-refontify.
(font-lock-choose-keywords):
Ignore LEVEL unless KEYWORDS is a list of syms.
(c-keywords, c++-keywords, objc-keywords, java-keywords):
Don't wrap regexp-opt things in \(...\) unnecessarily.
2000-10-08 19:07:14 +00:00
Eli Zaretskii
3b967bedc7 (font-lock-mode, global-font-lock-mode): Mention in
the doc strings how to customize Font Lock faces.
2000-10-08 06:50:22 +00:00
Stefan Monnier
28a53bc103 (font-lock-defaults-alist): Remove the TeX entries.
(tex-font-lock-keywords, tex-font-lock-keywords-2)
(tex-font-lock-keywords-1): Remove.
(font-lock-turn-on-thing-lock): Use jit-lock-register.
(font-lock-turn-off-thing-lock): Use jit-lock-unregister.
(font-lock-default-fontify-region): Expand beg..end correctly
when just following a multiline region.
(font-lock-fontify-anchored-keywords):
Include the anchor text as part of the multiline.
2000-10-06 16:02:27 +00:00
Stefan Monnier
d2251bbf79 Replace confusing (,@ with ,
(tex-font-lock-keywords-1, tex-font-lock-keywords-2):
Don't use regexp-opt-depth.  Spice up the regexp for args.
Don't distinguish between cmds that can take an opt arg or not.
Use `append' and `prepend' rather than `keep'.
2000-09-29 01:53:42 +00:00
Gerd Moellmann
afd3c8cd42 (font-lock-mode): Change message telling the user
that ``the buffer is too big''.
2000-09-19 11:03:14 +00:00
Gerd Moellmann
8e5b2bfe48 Require jit-lock to prevent a late message `Loading jit-lock' message. 2000-08-15 14:10:04 +00:00
Sam Steingold
5e9e032a38 * emacs-lisp/cl-indent.el (toplevel): Indent `defclass',
`defconst', `define-condition', `with-slots'.
* font-lock.el (lisp-font-lock-keywords-2): Added `with-' and `do-'.
2000-08-07 16:51:57 +00:00
Dave Love
c69e5fcdae (font-lock-fontify-anchored-keywords): Use line-beginning-position.
(font-lock-support-mode) <defgroup>: Add :version.
(global-font-lock-mode): Use mapc.
2000-06-23 19:37:14 +00:00
Stefan Monnier
13f0d185ef (font-lock-after-fontify-buffer)
(font-lock-after-unfontify-buffer): No need to call back to jit-lock.
2000-06-17 17:22:41 +00:00
Stefan Monnier
1a5c5f2e4f (lisp-font-lock-keywords-1): Add define-minor-mode. 2000-05-12 18:11:37 +00:00
Gerd Moellmann
0279f991f7 Update copyright. Remove Simon Marshall's email
address on request from him.
2000-05-11 14:44:17 +00:00
Gerd Moellmann
bdb25c9734 (font-lock-apply-syntactic-highlight): if VALUE
is a string, convert it to a syntax cell using string-to-syntax.
2000-03-18 01:33:13 +00:00
Stefan Monnier
afa18a4e5d (font-lock-keywords): Fix the doc now that regexp-opt-depth is unnecessary.
(save-buffer-state): Set an edebug spec.
(font-lock-fontify-anchored-keywords): Properly handle the case where the
matcher goes past the limit.
2000-03-11 03:50:50 +00:00
Gerd Moellmann
11b42ef4cd (lisp-font-lock-keywords-1): Highlight
`(defun (setf foo)' differently.
2000-03-09 13:28:42 +00:00
Gerd Moellmann
32038c7ac0 (java-keywords): Added missing java 1.2.2 Javadoc tags. 2000-02-29 09:37:22 +00:00
Stefan Monnier
6e1d0d151d (font-lock-keywords): Fix doc for multiline matches.
(font-lock-add-keywords): Make it work even if font-lock-mode is nil,
so that it can be used more easily in <foo>-mode-hook.  Also make sure
to avoid duplicate entries.
(font-lock-update-removed-keyword-alist): Renamed `major-mode'->`mode'.
(font-lock-remove-keywords): Just as was done for `add', allow it to
work even if font-lock-mode is nil.  Also make sure we don't modify
any pre-existing list by forcing a copy-sequence.  Finally rename
`major-mode' to `mode'.
(font-lock-fontify-syntactic-anchored-keywords)
(font-lock-fontify-anchored-keywords)
(font-lock-fontify-keywords-region): Use line-end-position.
Don't make `font-lock-multiline' local (it's now done in
font-lock-set-defaults).
(font-lock-set-defaults): Make `font-lock-multiline' local.  Also
move the `font-lock-fontified' creation to inside the `unless'.
2000-02-07 01:49:33 +00:00
Dave Love
01b691481a (turn-on-font-lock): Don't depend on window-system &c. 2000-01-24 22:16:14 +00:00
Gerd Moellmann
76f5e2afd4 System for adding and removing keywords.
Both local (previously added keyword) and global keywords
can be removed.
(font-lock-remove-keywords): New user-level function.
(font-lock-update-removed-keyword-alist): New internal function.
(font-lock-removed-keywords-alist): New variable.
(font-lock-add-keywords): Updates `font-lock-removed-keywords-alist'.
Empty `font-lock-keywords-alist' when `append' is `set' to avoid
growing datastructures.
(font-lock-set-defaults): Removes keywords stored in
`font-lock-removed-keywords-alist' after local keywords added.
(c-keywords, c++-keywords): Better "case" support for
complex constant expressions, e.g. "case 1<<A_BIT_NO:".
(c-keywords): Only highlight preprocessor
directives when spelled correctly.
(font-lock-match-c++-structor-declaration,
c++-keywords): Fontify constructors and destructors with function
face inside C++ class declarations.
1999-12-16 15:05:06 +00:00
Gerd Moellmann
340fe50f3b (java-keywords): Add Javadoc tags as of JDK 1.2.1. 1999-12-16 12:11:18 +00:00
Stefan Monnier
041470d2d9 (font-lock-multiline): New variable.
(font-lock-add-keywords): Rename `major-mode' into `mode'.
(font-lock-remove-keywords): Added a dummy `mode' argument for
potential future support.
(font-lock-fontify-anchored-keywords,
(font-lock-fontify-keywords-region): Only handle multiline strings
if necessary (avoids a pathological behavior in (f.ex) diff-mode).
1999-12-09 12:52:34 +00:00
Stefan Monnier
3708dfe933 (font-lock-default-fontify-region): Fix subtle
off-by-one problem that could force re-fontifying the whole buffer.
(font-lock-remove-keywords): New function.
(font-lock-add-keywords): Use the new function to ensure idempotence.
1999-12-07 06:31:57 +00:00
Dave Love
019f00d822 Doc fixes. 1999-11-26 17:41:55 +00:00
Richard M. Stallman
731dd88518 (lisp-font-lock-keywords-1): Recognize an autoload
cookie, even if followed by a letter.
1999-09-14 17:32:51 +00:00
Richard M. Stallman
fb0e4f8a84 (font-lock-multiline): New text property contains
a boolean to indicate if the char is part of a multiline match.
(font-lock-default-fontify-region): Extend the region appropriately
for multiline keywords.
(font-lock-default-unfontify-region): Also remove the new
font-lock-multiline text property.
(font-lock-fontify-anchored-keywords): Mark multiline anchored matches.
(font-lock-fontify-keywords-region): Mark multiline regexp matches.
1999-09-07 19:21:50 +00:00
Dave Love
443de9cd11 (global-font-lock-mode): Autoload. Add :initialize. 1999-08-19 18:31:24 +00:00
Gerd Moellmann
5f999b0b9c (font-lock-support-mode): Make `jit-lock-mode'
the default so that beginners can benefit from it without
searching in manuals.
1999-08-18 12:03:57 +00:00
Dave Love
63e20d60c2 Add a :link to font-lock defgroup.
(jit-lock): Add :version.
1999-08-16 14:32:05 +00:00
Dave Love
faa57c0a92 (jit-lock): Fix :load, add :version. 1999-07-30 11:09:57 +00:00
Dave Love
a33209e8ef (turn-on-font-lock): Use tty-display-color-p. 1999-07-23 16:44:54 +00:00
Gerd Moellmann
e7f07c2ccf (top-level): Add jit-lock-mode as new support mode.
(font-lock-fontify-keywords-region): Stop when
reaching end instead of letting re-search-forward signal an error.
(jit-lock-mode): New.
(font-lock-turn-on-thing-lock): Add jit-lock-mode.
(font-lock-turn-off-thing-lock): Ditto.
(font-lock-after-fontify-buffer): Ditto.
(font-lock-after-unfontify-buffer): Ditto.
(font-lock-comment-face): Add spec for color tty.
(font-lock-string-face): Ditto.
(font-lock-keyword-face): Ditto.
(font-lock-builtin-face): Ditto.
(font-lock-function-name-face): Ditto.
(font-lock-variable-name-face): Ditto.
(font-lock-type-face): Ditto.
(font-lock-constant-face): Ditto.
(font-lock-warning-face): Ditto.
(font-lock-comment-face): Use new face attribute names.
(font-lock-string-face): Ditto.
(font-lock-keyword-face): Ditto.
(font-lock-builtin-face): Ditto.
(font-lock-function-name-face): Ditto.
(font-lock-variable-name-face): Ditto.
(font-lock-type-face): Ditto.
(font-lock-reference-face): Ditto.
(font-lock-warning-face): Ditto.
1999-07-23 10:59:35 +00:00
Karl Heuer
f56f1421df (lisp-font-lock-keywords-2): Fix regexp. 1999-07-23 08:46:55 +00:00
Karl Heuer
9dc09247db (c++-font-lock-extra-types): Add "type_info". 1999-07-20 22:14:00 +00:00
Karl Heuer
5d8b66ebef (c++-keywords): Add "typeid". 1999-07-20 04:39:17 +00:00
Karl Heuer
1faf64740a (font-lock-apply-syntactic-highlight): Don't die if
VALUE is a syntax table.
1999-05-29 19:20:07 +00:00
Dave Love
a775a63e07 (global-font-lock-mode): Doc fix. 1999-04-27 18:55:02 +00:00
Karl Heuer
25f67e4bc9 *** empty log message *** 1999-03-30 21:37:40 +00:00
Karl Heuer
24789c69cd (global-font-lock-mode): Doc fix. 1999-03-30 21:28:05 +00:00
Simon Marshall
4d80b2cc0f * font-lock.el (c-font-lock-keywords-2): Only fontify a label if it is
on the line by itself.
        (java-font-lock-keywords-2): Likewise.  Don't fontify a class name if
        it is not in a declarative context.
1999-03-23 15:31:44 +00:00