]> code.delx.au - gnu-emacs/blobdiff - lisp/font-lock.el
(rmail-duplicate-message): Make it work.
[gnu-emacs] / lisp / font-lock.el
index 3f81de0b144d23162f1167f78bff93905a20ff59..9c1775b25cbf09d6b05a6a46bb59d1dfff9925dd 100644 (file)
@@ -1,10 +1,12 @@
 ;;; 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
 
 ;; 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),
@@ -249,7 +251,7 @@ for buffers in Rmail mode, and size is irrelevant otherwise."
   :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).
@@ -274,7 +276,7 @@ decoration for buffers in C++ mode, and level 1 decoration otherwise."
   :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)
@@ -288,6 +290,11 @@ If a number, only buffers greater than this size have fontification messages."
 ;; 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.")
 
@@ -485,7 +492,8 @@ This is normally set via `font-lock-defaults'.")
 
 (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
@@ -845,7 +853,7 @@ happens, so the major mode can be corrected."
 ;; 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.
@@ -2252,9 +2260,9 @@ in which C preprocessor directives are used. e.g. `asm-mode' and
               '("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"