(put 'font-lock-defaults 'risky-local-variable t)
(make-variable-buffer-local 'font-lock-defaults)
-(defvar font-lock-defaults-alist nil
- "Alist of fall-back Font Lock defaults for major modes.
-
-Each item should be a list of the form:
-
- (MAJOR-MODE . FONT-LOCK-DEFAULTS)
-
-where MAJOR-MODE is a symbol and FONT-LOCK-DEFAULTS is a list of default
-settings. See the variable `font-lock-defaults', which takes precedence.")
-(make-obsolete-variable 'font-lock-defaults-alist 'font-lock-defaults "21.1")
-
(defvar font-lock-function 'font-lock-default-function
"A function which is called when `font-lock-mode' is toggled.
It will be passed one argument, which is the current value of
lines around point), perhaps because modification on the current line caused
syntactic change on other lines, you can use \\[font-lock-fontify-block].
-See the variable `font-lock-defaults-alist' for the Font Lock mode default
-settings. You can set your own default settings for some mode, by setting a
+You can set your own default settings for some mode, by setting a
buffer local value for `font-lock-defaults', via its mode hook.
The above is the default behavior of `font-lock-mode'; you may specify
;; `font-lock-defaults'.
(when (or font-lock-defaults
(if (boundp 'font-lock-keywords) font-lock-keywords)
- (with-no-warnings
- (cdr (assq major-mode font-lock-defaults-alist)))
(and mode
(boundp 'font-lock-set-defaults)
font-lock-set-defaults
(provide 'font-core)
-;; arch-tag: f8c286e1-02f7-41d9-b89b-1b67780aed71
;;; font-core.el ends here
;;; 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.
+;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+;; 2010 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
(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
(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))
\f
(provide 'font-lock)
-;; arch-tag: 682327e4-64d8-4057-b20b-1fbb9f1fc54c
;;; font-lock.el ends here