;;; 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, 2009, 2010
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1992-2011 Free Software Foundation, Inc.
;; Author: Jamie Zawinski
;; Richard Stallman
;; Modes that support Font Lock mode do so by defining one or more variables
;; whose values specify the fontification. Font Lock mode knows of these
-;; variable names from (a) the buffer local variable `font-lock-defaults', if
-;; non-nil, or (b) the global variable `font-lock-defaults-alist', if the major
-;; mode has an entry. (Font Lock mode is set up via (a) where a mode's
-;; patterns are distributed with the mode's package library, and (b) where a
-;; mode's patterns are distributed with font-lock.el itself. An example of (a)
+;; variable names from the buffer local variable `font-lock-defaults'.
+;; (Font Lock mode is set up via (a) where a mode's patterns are
+;; distributed with the mode's package library, and (b) where a mode's
+;; patterns are distributed with font-lock.el itself. An example of (a)
;; is Pascal mode, an example of (b) is Lisp mode. Normally, the mechanism is
;; (a); (b) is used where it is not clear which package library should contain
;; the pattern definitions.) Font Lock mode chooses which variable to use for
(integer :tag "level" 1)))))
:group 'font-lock)
-(defcustom font-lock-verbose 0
+(defcustom font-lock-verbose nil
"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)
(integer :tag "size"))
- :group 'font-lock)
+ :group 'font-lock
+ :version "24.1")
\f
;; Originally these variable values were face names such as `bold' etc.
This is normally set via `font-lock-defaults'.")
(make-obsolete-variable 'font-lock-beginning-of-syntax-function
- 'syntax-begin-function "23.3")
+ 'syntax-begin-function "23.3" 'set)
(defvar font-lock-mark-block-function nil
"*Non-nil means use this function to mark a block of text.
(defun font-lock-refresh-defaults ()
"Restart fontification in current buffer after recomputing from defaults.
-Recompute fontification variables using `font-lock-defaults' (or,
-if nil, using `font-lock-defaults-alist') and
+Recompute fontification variables using `font-lock-defaults' and
`font-lock-maximum-decoration'. Then restart fontification.
Use this function when you have changed any of the above
Note: This function will erase modifications done by
`font-lock-add-keywords' or `font-lock-remove-keywords', but will
preserve `hi-lock-mode' highlighting patterns."
- (let ((hi-lock--inhibit-font-lock-hook t))
- (font-lock-mode -1))
+ (font-lock-mode -1)
(kill-local-variable 'font-lock-set-defaults)
(font-lock-mode 1))
(defun font-lock-set-defaults ()
"Set fontification defaults appropriately for this mode.
-Sets various variables using `font-lock-defaults' (or, if nil, using
-`font-lock-defaults-alist') and `font-lock-maximum-decoration'."
+Sets various variables using `font-lock-defaults' and
+`font-lock-maximum-decoration'."
;; Set fontification defaults if not previously set for correct major mode.
(unless (and font-lock-set-defaults
(eq font-lock-major-mode major-mode))
(set (make-local-variable 'font-lock-set-defaults) t)
(make-local-variable 'font-lock-fontified)
(make-local-variable 'font-lock-multiline)
- (let* ((defaults (or font-lock-defaults
- (cdr (assq major-mode
- (with-no-warnings
- font-lock-defaults-alist)))))
+ (let* ((defaults font-lock-defaults)
(keywords
(font-lock-choose-keywords (nth 0 defaults)
(font-lock-value-in-major-mode font-lock-maximum-decoration)))
;; ;; Activate less/more fontification entries if there are multiple levels for
;; ;; the current buffer. Sets `font-lock-fontify-level' to be of the form
;; ;; (CURRENT-LEVEL IS-LOWER-LEVEL-P IS-HIGHER-LEVEL-P) for menu activation.
-;; (let ((keywords (or (nth 0 font-lock-defaults)
-;; (nth 1 (assq major-mode font-lock-defaults-alist))))
+;; (let ((keywords (nth 0 font-lock-defaults))
;; (level (font-lock-value-in-major-mode font-lock-maximum-decoration)))
;; (make-local-variable 'font-lock-fontify-level)
;; (if (or (symbolp keywords) (= (length keywords) 1))
"\\)\\)\\>"
;; Any whitespace and defined object.
"[ \t'\(]*"
- "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?")
+ "\\(setf[ \t]+\\sw+\\|\\sw+\\)?")
(1 font-lock-keyword-face)
(9 (cond ((match-beginning 3) font-lock-function-name-face)
((match-beginning 6) font-lock-variable-name-face)
\f
(provide 'font-lock)
-;; arch-tag: 682327e4-64d8-4057-b20b-1fbb9f1fc54c
;;; font-lock.el ends here