1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
Commit Graph

144 Commits

Author SHA1 Message Date
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
Simon Marshall
b09f207af2 added strictfp type modifier. 1999-03-18 10:16:14 +00:00
Simon Marshall
495b993235 Added "complex" type to c-font-lock-keywords-2. 1999-03-18 09:58:18 +00:00
Simon Marshall
336911a14c (c-font-lock-keywords-2): Added "restrict" keyword. 1999-03-15 15:20:56 +00:00
Simon Marshall
68c67d1f82 * font-lock.el (c++-font-lock-keywords-3): Use c-at-toplevel-p to distinguish
correctly an object declared via a constructor from a method.
(font-lock-defaults-alist): Don't give `.' word syntax for Java.
(java-font-lock-keywords-1): Fontify package names individually.
(java-font-lock-extra-types): Ensure regexp matches capitalised types only.
(java-font-lock-keywords-2): Simplify type fontification.
(java-font-lock-keywords-3): Likewise.
1999-02-17 10:06:41 +00:00
Richard M. Stallman
13911e1d18 (font-lock-default-unfontify-region):
If not font-lock-syntactic-keywords, don't remove syntax-table prop.
1999-01-28 19:45:13 +00:00
Simon Marshall
1787769bcc * font-lock.el (font-lock-default-fontify-buffer): When using
with-temp-message, use nil rather than current-message.
1999-01-06 10:08:49 +00:00
Simon Marshall
b4b989a063 wrap java-minor-types in java-font-lock-keywords-2. 1998-12-07 10:54:47 +00:00
Simon Marshall
79f238c95f * font-lock.el (font-lock-defaults): Doc fix.
(font-lock-default-fontify-buffer): Rewritten to use with-temp-message.
	(lisp-font-lock-keywords-2): Fontify with-temp-message as a keyword.
1998-11-23 11:12:40 +00:00
Simon Marshall
4fffc0710e (tex-font-lock-keywords-2): Fontify \nocite like \cite.
(lisp-font-lock-keywords-2): Fontify abort, assert, etc., separately.
({c,c++,objc,java}-font-lock-keywords-{2,3}): Fontify only type/class
names with font-lock-type-face.  Fontify type specs, etc., with
font-lock-keyword-face.
1998-09-01 09:01:44 +00:00
Simon Marshall
39df451ba4 (lisp-font-lock-keywords-1): Fix previous change.
(font-lock-support-mode): Allow nil as a mode-specific value.  Fix tag.
1998-08-03 08:52:35 +00:00
Richard M. Stallman
ae659ad5e2 (lisp-font-lock-keywords-1): Fontify defconstant' and defparameter'.
(lisp-font-lock-keywords-2): Fontify `lambda', `in-package' and `locally'.
1998-07-31 03:17:08 +00:00
Richard M. Stallman
aaa154880b (lisp-font-lock-keywords-2): support `handler-*',
`restart-*', `*-bind', `abort', `the', `break', `compiler-let'
`symbol-macrolet' etc.
(lisp-font-lock-keywords-1): Support `define-*-macro',
`define-condition', `define-setf-expander' etc.
1998-07-14 08:22:05 +00:00
Richard M. Stallman
3fd00dcb42 (lisp-font-lock-keywords): Fontify handler-case', ccase',
`ctypecase', `assert', `error'.
1998-07-10 03:19:33 +00:00
Andreas Schwab
b4a38363e6 (font-lock-verbose): Use `other' widget type. 1998-06-24 09:09:56 +00:00
Simon Marshall
5bbc1cf756 move defpackage to lisp-font-lock-keywords-1 1998-05-05 09:29:55 +00:00
Richard M. Stallman
a58ef230d3 (lisp-font-lock-keywords-2): Added `defpackage'.
.
1998-04-24 19:46:03 +00:00
Simon Marshall
ae7460eed6 add some C/C++ keywords. 1998-03-25 16:56:12 +00:00
Dave Love
b632d90a16 (scheme-font-lock-keywords-1, scheme-font-lock-keywords-2,
scheme-font-lock-keywords): Moved.
1998-03-10 22:54:43 +00:00
Simon Marshall
8acf2292d9 Renamed font-lock-reference-face to font-lock-constant-face. 1998-02-20 14:24:57 +00:00
Simon Marshall
9c8de95c2a Keyword doc fixes and keyword tweaks. 1998-02-18 09:12:24 +00:00
Richard M. Stallman
caf0dd7116 (font-lock-keywords): Doc fix. 1998-02-06 06:10:30 +00:00
Dave Love
741e2425d0 (lisp-font-lock-keywords-1): Correct defmethod addition. 1998-01-23 16:50:56 +00:00
Simon Marshall
b9dd672d87 (c++-font-lock-extra-types): Add some container classes.
(c-font-lock-keywords-1): Use builtin face for preprocessor directives.
1998-01-15 16:11:00 +00:00
Dave Love
5c79a131c1 (lisp-font-lock-keywords-1): Add defmethod. 1998-01-12 18:54:01 +00:00
Simon Marshall
844a6a4670 Allow any number of ::foos in declarative items. 1997-10-28 14:16:40 +00:00
Simon Marshall
5b341c7e2c Don't fontify \item like \it. 1997-09-15 09:03:45 +00:00
Simon Marshall
e0e277ff6a Try to comment where font-lock-keyword order is important. 1997-09-09 13:01:02 +00:00