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.
This commit is contained in:
parent
645a6257c4
commit
6aecca9993
4 changed files with 21 additions and 35 deletions
3
etc/NEWS
3
etc/NEWS
|
|
@ -565,7 +565,8 @@ make-local-hook
|
|||
|
||||
** 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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -81,17 +81,6 @@ functions, `font-lock-fontify-buffer-function',
|
|||
(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 @@ To fontify a block (the function or paragraph containing point, or a number 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
|
||||
|
|
@ -207,8 +195,6 @@ this function onto `change-major-mode-hook'."
|
|||
;; `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 @@ means that Font Lock mode is turned on for buffers in C and C++ modes only."
|
|||
|
||||
(provide 'font-core)
|
||||
|
||||
;; arch-tag: f8c286e1-02f7-41d9-b89b-1b67780aed71
|
||||
;;; font-core.el ends here
|
||||
|
|
|
|||
|
|
@ -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 @@ A LEVEL of nil is equal to a LEVEL of 0, a LEVEL of t is equal to
|
|||
|
||||
(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 @@ preserve `hi-lock-mode' highlighting patterns."
|
|||
|
||||
(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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
|
|||
(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 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
|
|||
;; ;; 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 @@ in which C preprocessor directives are used. e.g. `asm-mode' and
|
|||
|
||||
(provide 'font-lock)
|
||||
|
||||
;; arch-tag: 682327e4-64d8-4057-b20b-1fbb9f1fc54c
|
||||
;;; font-lock.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue