aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2000-10-08 06:50:22 +0000
committerEli Zaretskii2000-10-08 06:50:22 +0000
commit3b967bedc7116ce491f0d92cfbc7f9a176e93ea0 (patch)
tree31be7a32a86f0c06007751d130152ed7a158b7c6
parent984f5aaa6199142c112ce6c0fcafea8ddf42bfb9 (diff)
downloademacs-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.el10
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.
638With arg, turn Font Lock mode on if and only if arg is positive. 638With arg, turn Font Lock mode on if and only if arg is positive.
639(Font Lock is also known as \"syntax highlighting\".)
639 640
640When Font Lock mode is enabled, text is fontified as you type it: 641When 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
648To customize the faces (colors, fonts, etc.) used by Font Lock for
649fontifying different parts of buffer text, use \\[customize-face].
650
647You can enable Font Lock mode in any major mode automatically by turning on in 651You can enable Font Lock mode in any major mode automatically by turning on in
648the major mode's hook. For example, put in your ~/.emacs: 652the 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\".)
927With prefix ARG, turn Global Font Lock mode on if and only if ARG is positive. 932With prefix ARG, turn Global Font Lock mode on if and only if ARG is positive.
928Displays a message saying whether the mode is on or off if MESSAGE is non-nil. 933Displays a message saying whether the mode is on or off if MESSAGE is non-nil.
929Returns the new status of Global Font Lock mode (non-nil means on). 934Returns the new status of Global Font Lock mode (non-nil means on).
930 935
931When Global Font Lock mode is enabled, Font Lock mode is automagically 936When Global Font Lock mode is enabled, Font Lock mode is automagically
932turned on in a buffer if its major mode is one of `font-lock-global-modes'." 937turned on in a buffer if its major mode is one of `font-lock-global-modes'.
938
939To customize the faces (colors, fonts, etc.) used by Font Lock for
940highlighting 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)