changeset 110785:3f3735eed163

Remove obsolete variable font-lock-defaults-alist. * lisp/font-core.el (font-lock-defaults-alist): Remove variable. (font-lock-mode): Doc fix. (font-lock-default-function): Do not consult font-lock-defaults-alist. * lisp/font-lock.el (font-lock-refresh-defaults): Doc fix. (font-lock-set-defaults): Doc fix. Do not consult font-lock-defaults-alist. * etc/NEWS: Mention above change.
author Glenn Morris <rgm@gnu.org>
date Tue, 05 Oct 2010 21:14:05 -0700
parents e7fd8dc3d74d
children 9a3ce1aa9d45
files etc/NEWS lisp/ChangeLog lisp/font-core.el lisp/font-lock.el
diffstat 4 files changed, 21 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS	Tue Oct 05 21:06:25 2010 -0700
+++ b/etc/NEWS	Tue Oct 05 21:14:05 2010 -0700
@@ -565,7 +565,8 @@
 
 ** The following variables and aliases, obsolete since at least Emacs 21.1,
 have been removed:
-checkdoc-minor-keymap, vc-header-alist, directory-sep-char
+checkdoc-minor-keymap, vc-header-alist, directory-sep-char,
+font-lock-defaults-alist
 
 ** The following files, obsolete since at least Emacs 21.1, have been removed:
 sc.el, x-menu.el, rnews.el, rnewspost.el
--- a/lisp/ChangeLog	Tue Oct 05 21:06:25 2010 -0700
+++ b/lisp/ChangeLog	Tue Oct 05 21:14:05 2010 -0700
@@ -1,5 +1,12 @@
 2010-10-06  Glenn Morris  <rgm@gnu.org>
 
+	* font-core.el (font-lock-defaults-alist): Remove variable.
+	(font-lock-mode): Doc fix.
+	(font-lock-default-function): Do not consult font-lock-defaults-alist.
+	* font-lock.el (font-lock-refresh-defaults): Doc fix.
+	(font-lock-set-defaults): Doc fix.
+	Do not consult font-lock-defaults-alist.
+
 	* hilit-chg.el (hilit-chg-get-diff-list-hk): Declare `e' for compiler.
 
 	* emacs-lisp/cl.el: No longer provide cl-19.
--- a/lisp/font-core.el	Tue Oct 05 21:06:25 2010 -0700
+++ b/lisp/font-core.el	Tue Oct 05 21:14:05 2010 -0700
@@ -81,17 +81,6 @@
 (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
@@ -144,8 +133,7 @@
 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
@@ -207,8 +195,6 @@
   ;; `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
@@ -310,5 +296,4 @@
 
 (provide 'font-core)
 
-;; arch-tag: f8c286e1-02f7-41d9-b89b-1b67780aed71
 ;;; font-core.el ends here
--- a/lisp/font-lock.el	Tue Oct 05 21:06:25 2010 -0700
+++ b/lisp/font-lock.el	Tue Oct 05 21:14:05 2010 -0700
@@ -1,8 +1,8 @@
 ;;; 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
@@ -102,11 +102,10 @@
 
 ;; 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
@@ -1758,8 +1757,7 @@
 
 (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
@@ -1779,8 +1777,8 @@
 
 (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))
@@ -1788,10 +1786,7 @@
     (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)))
@@ -2082,8 +2077,7 @@
 ;;  ;; 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))
@@ -2353,5 +2347,4 @@
 
 (provide 'font-lock)
 
-;; arch-tag: 682327e4-64d8-4057-b20b-1fbb9f1fc54c
 ;;; font-lock.el ends here