;;; font-lock.el --- Electric font lock mode
;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
;; Free Software Foundation, Inc.
-;; Author: jwz, then rms, then sm
+;; Author: Jamie Zawinski
+;; Richard Stallman
+;; Stefan Monnier
;; Maintainer: FSF
;; Keywords: languages, faces
;; the pattern definitions.) Font Lock mode chooses which variable to use for
;; fontification based on `font-lock-maximum-decoration'.
;;
-;; Font Lock mode fontification behaviour can be modified in a number of ways.
+;; Font Lock mode fontification behavior can be modified in a number of ways.
;; See the below comments and the comments distributed throughout this file.
;;; Constructing patterns:
;; User variables.
(defcustom font-lock-maximum-size 256000
- "*Maximum size of a buffer for buffer fontification.
+ "Maximum size of a buffer for buffer fontification.
Only buffers less than this can be fontified when Font Lock mode is turned on.
If nil, means size is irrelevant.
If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
:group 'font-lock)
(defcustom font-lock-maximum-decoration t
- "*Maximum decoration level for fontification.
+ "Maximum decoration level for fontification.
If nil, use the default decoration (typically the minimum available).
If t, use the maximum decoration available.
If a number, use that level of decoration (or if not available the maximum).
:group 'font-lock)
(defcustom font-lock-verbose 0
- "*If non-nil, means show status messages for buffer fontification.
+ "If non-nil, means show status messages for buffer fontification.
If a number, only buffers greater than this size have fontification messages."
:type '(choice (const :tag "never" nil)
(other :tag "always" t)
;; We now allow a FACENAME in `font-lock-keywords' to be any expression that
;; returns a face. So the easiest thing is to continue using these variables,
;; rather than sometimes evaling FACENAME and sometimes not. sm.
+
+;; Note that in new code, in the vast majority of cases there is no
+;; need to create variables that specify face names. Simply using
+;; faces directly is enough. Font-lock is not a template to be
+;; followed in this area.
(defvar font-lock-comment-face 'font-lock-comment-face
"Face name to use for comments.")
(defvar font-lock-keywords-case-fold-search nil
"*Non-nil means the patterns in `font-lock-keywords' are case-insensitive.
-This is normally set via `font-lock-defaults'.")
+This is set via the function `font-lock-set-defaults', based on
+the CASE-FOLD argument of `font-lock-defaults'.")
(make-variable-buffer-local 'font-lock-keywords-case-fold-search)
(defvar font-lock-syntactically-fontified 0
;; themselves.
(defcustom font-lock-support-mode 'jit-lock-mode
- "*Support mode for Font Lock mode.
+ "Support mode for Font Lock mode.
Support modes speed up Font Lock mode by being choosy about when fontification
occurs. The default support mode, Just-in-time Lock mode (symbol
`jit-lock-mode'), is recommended.
'("cond" "if" "while" "while-no-input" "let" "let*"
"prog" "progn" "progv" "prog1" "prog2" "prog*"
"inline" "lambda" "save-restriction" "save-excursion"
- "save-window-excursion" "save-selected-window"
- "save-match-data" "save-current-buffer" "unwind-protect"
- "condition-case" "track-mouse"
+ "save-selected-window" "save-window-excursion"
+ "save-match-data" "save-current-buffer"
+ "unwind-protect" "condition-case" "track-mouse"
"eval-after-load" "eval-and-compile" "eval-when-compile"
"eval-when" "eval-at-startup" "eval-next-after-load"
"with-case-table" "with-category-table"