diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-06-16 16:00:22 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-06-16 16:00:22 -0400 |
commit | 36901266a8acb83880fefee50c93abb09f64533b (patch) | |
tree | 1f35549a951941504177432b0a5c9857f9924093 /lisp/font-lock.el | |
parent | 8b9f5fe8d850c7724aabbfdbd26cb4afdf1d6440 (diff) | |
download | emacs-36901266a8acb83880fefee50c93abb09f64533b.tar.gz |
* lisp/font-lock.el (font-lock-major-mode): Rename from
font-lock-mode-major-mode to distinguish it from
global-font-lock-mode's own font-lock-mode-major-mode.
(font-lock-set-defaults):
* lisp/font-core.el (font-lock-default-function): Adjust users.
(font-lock-mode): Don't set it at all.
Fixes: debbugs:6135
Diffstat (limited to 'lisp/font-lock.el')
-rw-r--r-- | lisp/font-lock.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 0a0499d8db4..b4a2a72eee8 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1784,15 +1784,18 @@ preserve `hi-lock-mode' highlighting patterns." (kill-local-variable 'font-lock-set-defaults) (font-lock-mode 1)) -(defvar font-lock-mode-major-mode) +(defvar font-lock-major-mode nil + "Major mode for which the font-lock settings have been setup.") +(make-variable-buffer-local 'font-lock-major-mode) + (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'." ;; Set fontification defaults if not previously set for correct major mode. (unless (and font-lock-set-defaults - (eq font-lock-mode-major-mode major-mode)) - (setq font-lock-mode-major-mode major-mode) + (eq font-lock-major-mode major-mode)) + (setq 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) |