1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

53 Commits

Author SHA1 Message Date
Simon Marshall
d46c21ecae Functionality for font-lock-beginning-of-syntax-function to be used by font-lock-fontify-region when calculating the cache state. Also wrap value of buffer-file-truename to guard against clash detection. Also add scheme-font-lock-keywords. 1995-08-10 13:57:18 +00:00
Richard M. Stallman
acedc3e30b (font-lock-make-faces): Redo logic for whether
to call font-lock-make-face for a given face.
1995-07-21 05:05:49 +00:00
Simon Marshall
bda609416b Do all cleanups in font-lock-fontify-region and font-lock-hack-keywords inside
their unwind-protect UNWINDFORMS.  Also eval inside font-lock-set-defaults, not
font-lock-choose-keywords.
1995-07-09 13:26:41 +00:00
Richard M. Stallman
4d8765a2dd (font-lock-make-faces): On grayscale screen,
use grays for background, not foreground.
1995-07-07 13:27:15 +00:00
Simon Marshall
fb512de99a Specify in font-lock-defaults/font-lock-defaults-alist which keywords we can
use based on font-lock-maximum-decoration.
1995-06-26 11:55:25 +00:00
Simon Marshall
8862b0db81 Change so font-lock-make-faces doesn't stomp all over user Font Lock faces. 1995-06-16 07:47:09 +00:00
Simon Marshall
52436656c3 Made font-lock-compile-keywords not compile if it looks like it already has. 1995-06-01 09:08:29 +00:00
Karl Heuer
800479f5fd (font-lock-revert-cleanup): Always turn font lock on.
(font-lock-mode): When turning mode off, always take out
the revert hooks.
1995-05-29 06:59:49 +00:00
Simon Marshall
826b2925cb Make font-lock.el use compiled keywords; added FN as possible matcher.
Use font-lock-syntax-table for syntactic fontification.
Use font-lock-after-fontify-buffer not font-lock-after-fontify-buffer-hook.
1995-04-24 10:49:03 +00:00
Richard M. Stallman
61392e7b04 (font-lock-make-faces): Determine font-lock-background-mode from color
values of background color.

(font-lock-make-faces-done): New variable.
(font-lock-make-faces): Set font-lock-make-faces-done to t.
Don't call it when loading the file.
(font-lock-mode): Call font-lock-make-faces if not yet done.
1995-04-16 05:41:53 +00:00
Simon Marshall
799761f0c1 Added font-lock-maximum-decoration; use it to set lisp-font-lock-keywords, and
C and C++ ones.
Added font-lock-after-fontify-buffer-hook; font-lock-fontify-buffer runs it.
Added font-lock-thing-lock-cleanup; font-lock-mode runs it when turning off.
Fixed font-lock-fontify-region so it uses forward-comment from comment-start,
rather than searching for comment-end.
Mods to lisp-font-lock-keywords-1 and 2.
1995-03-02 10:57:07 +00:00
Richard M. Stallman
3de76c480c (font-lock-fontify-region): Bind inhibit-read-only. Also buffer-file-name.
(font-lock-hack-keywords, font-lock-unfontify-region): Likewise.
1995-01-25 00:43:25 +00:00
Richard M. Stallman
e547d71e2c (font-lock-hack-keywords): Turn off undo generation.
(font-lock-unfontify-region. font-lock-fontify-region): Likewise.
1994-12-15 16:30:39 +00:00
Simon Marshall
9e116f87ad Comment out Oct 18 change to font-lock-after-change-function 1994-12-05 13:38:11 +00:00
Simon Marshall
0caef3e3b7 Added defaults for grayscale font-lock-reference-face. 1994-12-01 14:00:16 +00:00
Simon Marshall
5c06a8eb15 Add scheme-mode to font-lock-defaults-alist using lisp-font-lock-keywords. 1994-11-14 08:03:41 +00:00
Simon Marshall
2f12628e08 Wrap font-lock-fontify-region's string-match with save-match-data. 1994-11-03 15:30:39 +00:00
Richard M. Stallman
c9ed66f41f (font-lock-after-change-function): If inside a comment,
don't scan for keywords.

(font-lock-fontify-region): Discard leading spaces from comment-end.
1994-10-18 22:34:04 +00:00
Simon Marshall
d8a1aa6eca Use purify-flag not noninteractive. 1994-10-13 07:55:30 +00:00
Simon Marshall
b89e113498 * font-lock.el: To make font-lock.el dumpable: (font-lock-display-type,
font-lock-background-mode, font-lock-face-attributes): Default to nil.
	(font-lock-make-faces): New function.  Set them.
	(font-lock.el): Add to after-init-hook if noninteractive or use it.
	(font-lock-maximum-size): New variable.
	(font-lock-mode): Use it to fontify only if buffer is within it.
	(font-lock-defaults, font-lock-defaults-alist): Item for syntax table.
	(font-lock-set-defaults): Set font-lock-syntax-table too.
	(lisp-font-lock-keywords-2): Fix CLisp end-of-keyword in regexp.
	(c-font-lock-keywords-*): Specific to ANSI C.
	(c++-font-lock-keywords-*): Specific to ANSI C++.
1994-10-12 09:23:37 +00:00
Richard M. Stallman
2df1ee2352 (font-lock-set-defaults): Do nothing if font-lock-keywords already non-nil.
Use font-lock-defaults.
(font-lock-defaults): New variable.
1994-10-11 09:03:49 +00:00
Richard M. Stallman
7fd741024b Re-delete code deleted in rms's Oct 5 change. 1994-10-07 17:38:03 +00:00
Richard M. Stallman
a1eb1cf1db (compilation-mode-font-lock-keywords,
rmail-summary-font-lock-keywords, dired-font-lock-keywords,
shell-font-lock-keywords, texi-font-lock-keywords,
perl-font-lock-keywords): Deleted.

(font-lock-mode): Doc fix; use add/remove-hook, not
setq; removed make-local-variable of font-lock-no-comments.
(font-lock-set-defaults): Do it there, and use:
(font-lock-defaults-alist): Use it to set font-lock-keywords,
font-lock-keywords-case-fold-search and font-lock-no-comments.
(turn-on-font-lock): New function.
(font-lock-fontify-buffer): Made interruptible; deleted messages.

(font-lock-fontify-region): Made syntax state reliable
by widening within new restriction; let cstart and cend for speed;
outputs message.
(font-lock-after-change-function): Remove spurious goto-char and use
forward-line, not 1+ end-of-line, for end of fontification region.
(font-lock-any-properties-p): Removed, use text-property-not-all.

(font-lock-*-face): facename values are themselves.
(font-lock-variable-name-face, font-lock-reference-face): New vars.
(font-lock-doc-string-face): Removed.
(font-lock-keywords): Extended value syntax.
(font-lock-hack-keywords): Cope with it; outputs initial message.

Merged in face-lock.el:
(font-lock-display-type, font-lock-background-mode)
(font-lock-face-attributes): New variables, use it.
(font-lock-make-face): New function, use them.
1994-10-07 10:23:26 +00:00
Richard M. Stallman
050516df65 Delete the error when no window system. 1994-10-06 02:45:40 +00:00
Richard M. Stallman
b65a149a95 (font-lock-hack-keywords): Delete debugging code. 1994-08-06 05:02:00 +00:00
Richard M. Stallman
b056da51fb (font-lock-syntax-table): New syntax table.
(font-lock-hack-keywords): Use it temporarily here.
(font-lock-set-defaults): Set up special syntax table for C and C++.
1994-08-05 05:11:30 +00:00
Richard M. Stallman
65df085181 Don't alter the underline face.
(font-lock-hack-keywords, font-lock-fontify-region):
Don't call set-buffer-modified-p if no change in its value.

(font-lock-hack-keywords): Avoid changing the narrowing.

(c-font-lock-keywords-2): Insist on whitespace before a label.
1994-06-15 18:24:10 +00:00
Richard M. Stallman
055c8d713a (tex-font-lock-keywords): Make the pattern for
macros respect TeX's idea of identifiers.
(font-lock-set-defaults): Don't check for 'tex-mode, but instead
for 'plain-tex-mode, 'latex-mode, and 'slitex-mode which is what
tex-mode.el uses.
1994-06-11 12:11:27 +00:00
Richard M. Stallman
ed9d4b0a39 (shell-font-lock-keywords): Removed regexp for commands.
(rmail-summary-font-lock-keywords): New variable.
(font-lock-set-defaults): Use it.
1994-05-30 10:41:53 +00:00
Richard M. Stallman
9ab70935c1 (font-lock-after-change-function): Fix typo in prev chg.
(font-lock-mode): Use after-change-functions not after-change-function.
1994-05-18 23:38:24 +00:00
Richard M. Stallman
8f261d407b (font-lock-no-comments): New variable.
(font-lock-after-change-function): Test it.
(font-lock-fontify-buffer): Test it.
(font-lock-set-defaults): Set it.

(font-lock-mode): Make font-lock-no-comments local.
(font-lock-after-change-function): If we don't call
font-lock-fontify-region, clear out face props instead.

(font-lock-fontify-buffer): Don't give "syntactically"
message if we aren't doing that part.
1994-05-13 21:24:47 +00:00
Karl Heuer
d733c5ec03 Update copyright. 1994-05-03 22:46:37 +00:00
Richard M. Stallman
b545f35b46 (rmail-font-lock-keywords): New variable.
(compilation-mode-font-lock-keywords): New variable.
(font-lock-set-defaults): Use those vars in those modes.
1994-04-22 07:30:30 +00:00
Karl Heuer
7772e660eb Check for existence of windowing system. 1994-03-30 01:02:01 +00:00
Richard M. Stallman
1bd5084056 (c++-font-lock-keywords-1, c++-font-lock-keywords-2): New variables.
(c++-font-lock-keywords): Use c++-font-lock-keywords-1.
1994-03-05 23:32:27 +00:00
Karl Heuer
f60f18ae0c Clean up c-font-lock-keywords; now slightly more consistent about highlighting
declarations.
1994-02-26 00:14:42 +00:00
Richard M. Stallman
fee7a5a2e3 (lisp-font-lock-keywords-2): Quote the * in let*. 1994-02-10 04:43:50 +00:00
Richard M. Stallman
8023777cb1 (dired-font-lock-keywords): New variable.
(font-lock-set-defaults): Handle dired.el.
1994-02-02 23:45:08 +00:00
Richard M. Stallman
eeb1e03e1e (shell-font-lock-keywords): Doc fix. 1994-02-02 20:00:15 +00:00
Richard M. Stallman
03244f89b5 (font-lock-set-defaults): Handle shell mode.
(shell-font-lock-keywords): New variable.
1994-02-01 23:10:41 +00:00
Karl Heuer
7daa8d6b1c (font-lock-mode): Use the new hooks to get proper behavior on a revert. 1994-02-01 01:32:48 +00:00
Richard M. Stallman
87cd38d6ef (font-lock-mode): Set after-revert-hook
to refontify after revert.
1994-01-18 19:23:14 +00:00
Richard M. Stallman
66fceb6578 (font-lock-set-defaults): Add missing paren. 1993-12-26 08:21:22 +00:00
Richard M. Stallman
a47d9087bc (font-lock-set-defaults): Do nothing if font-lock-keywords is already set. 1993-12-23 04:36:41 +00:00
Richard M. Stallman
2555cdec34 (font-lock-hack-keywords):
Handle next-single-property-change returning nil.
1993-11-17 13:12:29 +00:00
Richard M. Stallman
366b3eccd6 (font-lock-fontify-buffer): Don't turn
font-lock-mode on and off; just call font-lock-set-defaults.
1993-10-26 20:46:34 +00:00
Richard M. Stallman
214507c70f (font-lock-fontify-region): Don't add `font-lock' props.
(font-lock-unfontify-region): Don't remove `font-lock' props.
(font-lock-hack-keywords): Don't add `font-lock' props.
Handle values other than t and nil for allow-overlap-p specially.
(c-font-lock-keywords-1): Don't override how comments in #if... appear.
Highlight text after #else or #endif.
1993-09-16 14:56:45 +00:00
Richard M. Stallman
522779f4c6 (font-lock-fontify-region): Put on `font-lock'
property as well as `face' property.
(font-lock-hack-keywords): Likewise.
1993-09-11 15:13:31 +00:00
Richard M. Stallman
d5d9ce9182 (font-lock-fontify-region): Handle comment-start-skip = nil. 1993-08-05 20:47:30 +00:00
Richard M. Stallman
1ec9e15b44 (font-lock-after-change-function):
Scan for comments and strings from beg of line.
(c-font-lock-keywords-1): Recognize &, like *, before fn name.
(perl-font-lock-keywords): Put digit 1 into function-name-face items.
Allow whitespace before the open-brace.
1993-07-23 05:10:00 +00:00