diff options
| author | Eli Zaretskii | 2000-10-08 06:50:22 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2000-10-08 06:50:22 +0000 |
| commit | 3b967bedc7116ce491f0d92cfbc7f9a176e93ea0 (patch) | |
| tree | 31be7a32a86f0c06007751d130152ed7a158b7c6 | |
| parent | 984f5aaa6199142c112ce6c0fcafea8ddf42bfb9 (diff) | |
| download | emacs-3b967bedc7116ce491f0d92cfbc7f9a176e93ea0.tar.gz emacs-3b967bedc7116ce491f0d92cfbc7f9a176e93ea0.zip | |
(font-lock-mode, global-font-lock-mode): Mention in
the doc strings how to customize Font Lock faces.
| -rw-r--r-- | lisp/font-lock.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 16832d41843..637b6d9a4ff 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -636,6 +636,7 @@ Major/minor modes can set this variable if they know which option applies.") | |||
| 636 | (defun font-lock-mode (&optional arg) | 636 | (defun font-lock-mode (&optional arg) |
| 637 | "Toggle Font Lock mode. | 637 | "Toggle Font Lock mode. |
| 638 | With arg, turn Font Lock mode on if and only if arg is positive. | 638 | With arg, turn Font Lock mode on if and only if arg is positive. |
| 639 | (Font Lock is also known as \"syntax highlighting\".) | ||
| 639 | 640 | ||
| 640 | When Font Lock mode is enabled, text is fontified as you type it: | 641 | When Font Lock mode is enabled, text is fontified as you type it: |
| 641 | 642 | ||
| @@ -644,6 +645,9 @@ When Font Lock mode is enabled, text is fontified as you type it: | |||
| 644 | - Certain other expressions are displayed in other faces according to the | 645 | - Certain other expressions are displayed in other faces according to the |
| 645 | value of the variable `font-lock-keywords'. | 646 | value of the variable `font-lock-keywords'. |
| 646 | 647 | ||
| 648 | To customize the faces (colors, fonts, etc.) used by Font Lock for | ||
| 649 | fontifying different parts of buffer text, use \\[customize-face]. | ||
| 650 | |||
| 647 | You can enable Font Lock mode in any major mode automatically by turning on in | 651 | You can enable Font Lock mode in any major mode automatically by turning on in |
| 648 | the major mode's hook. For example, put in your ~/.emacs: | 652 | the major mode's hook. For example, put in your ~/.emacs: |
| 649 | 653 | ||
| @@ -924,12 +928,16 @@ or nil. If nil, highlighting keywords are removed for the current buffer." | |||
| 924 | ;;;###autoload | 928 | ;;;###autoload |
| 925 | (defun global-font-lock-mode (&optional arg message) | 929 | (defun global-font-lock-mode (&optional arg message) |
| 926 | "Toggle Global Font Lock mode. | 930 | "Toggle Global Font Lock mode. |
| 931 | (Font Lock is also known as \"syntax highlighting\".) | ||
| 927 | With prefix ARG, turn Global Font Lock mode on if and only if ARG is positive. | 932 | With prefix ARG, turn Global Font Lock mode on if and only if ARG is positive. |
| 928 | Displays a message saying whether the mode is on or off if MESSAGE is non-nil. | 933 | Displays a message saying whether the mode is on or off if MESSAGE is non-nil. |
| 929 | Returns the new status of Global Font Lock mode (non-nil means on). | 934 | Returns the new status of Global Font Lock mode (non-nil means on). |
| 930 | 935 | ||
| 931 | When Global Font Lock mode is enabled, Font Lock mode is automagically | 936 | When Global Font Lock mode is enabled, Font Lock mode is automagically |
| 932 | turned on in a buffer if its major mode is one of `font-lock-global-modes'." | 937 | turned on in a buffer if its major mode is one of `font-lock-global-modes'. |
| 938 | |||
| 939 | To customize the faces (colors, fonts, etc.) used by Font Lock for | ||
| 940 | highlighting different parts of buffer text, use \\[customize-face]." | ||
| 933 | (interactive "P\np") | 941 | (interactive "P\np") |
| 934 | (let ((on-p (if arg | 942 | (let ((on-p (if arg |
| 935 | (> (prefix-numeric-value arg) 0) | 943 | (> (prefix-numeric-value arg) 0) |