diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-01-03 17:00:35 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2006-01-03 17:00:35 +0000 |
commit | 1c360af385c24ff34a1adb217e3d134cb8285782 (patch) | |
tree | 86bcef4b865c2fbad5369c607ee0c0284138d072 | |
parent | e7b394e177d55da20ca69ba4bdc847d3aa95caf7 (diff) | |
download | emacs-1c360af385c24ff34a1adb217e3d134cb8285782.tar.gz emacs-1c360af385c24ff34a1adb217e3d134cb8285782.tar.bz2 emacs-1c360af385c24ff34a1adb217e3d134cb8285782.zip |
(font-lock-fontify-buffer, font-lock-fontify-region): Make sure we've setup
font-lock's vars. It may influence which function we then call.
(font-lock-default-fontify-buffer): Don't bother calling set-defaults
here since it's too late anyway.
-rw-r--r-- | lisp/ChangeLog | 12 | ||||
-rw-r--r-- | lisp/font-lock.el | 6 |
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9e13b77a9c5..c517519b1b9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2006-01-03 Stefan Monnier <monnier@iro.umontreal.ca> + + * font-lock.el (font-lock-fontify-buffer, font-lock-fontify-region): + Make sure we've setup font-lock's vars. It may influence which + function we then call. + (font-lock-default-fontify-buffer): Don't bother calling set-defaults + here since it's too late anyway. + 2006-01-03 Romain Francoise <romain@orebokech.com> * startup.el (fancy-splash-tail, normal-splash-screen): @@ -42,8 +50,8 @@ (custom-theme-reset-variables, custom-reset-variables): Mark as XEmacs compatibility functions. We don't actually use these. - * cus-edit.el (custom-variable-state-set): Use - custom-variable-theme-value instead of custom-theme-value. + * cus-edit.el (custom-variable-state-set): + Use custom-variable-theme-value instead of custom-theme-value. (custom-face-state-set): Rename `standard' theme to `changed'. (custom-save-variables, custom-save-faces): Delete unneeded references to custom-reset-variables. diff --git a/lisp/font-lock.el b/lisp/font-lock.el index c05de2bc0b5..032b8fb04f8 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1,7 +1,7 @@ ;;; font-lock.el --- Electric font lock mode ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004 2005 Free Software Foundation, Inc. +;; 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ;; Author: jwz, then rms, then sm ;; Maintainer: FSF @@ -980,6 +980,7 @@ The value of this variable is used when Font Lock mode is turned on." (defun font-lock-fontify-buffer () "Fontify the current buffer the way the function `font-lock-mode' would." (interactive) + (font-lock-set-defaults) (let ((font-lock-verbose (or font-lock-verbose (interactive-p)))) (funcall font-lock-fontify-buffer-function))) @@ -987,6 +988,7 @@ The value of this variable is used when Font Lock mode is turned on." (funcall font-lock-unfontify-buffer-function)) (defun font-lock-fontify-region (beg end &optional loudly) + (font-lock-set-defaults) (funcall font-lock-fontify-region-function beg end loudly)) (defun font-lock-unfontify-region (beg end) @@ -1000,8 +1002,6 @@ The value of this variable is used when Font Lock mode is turned on." (with-temp-message (when verbose (format "Fontifying %s..." (buffer-name))) - ;; Make sure we have the right `font-lock-keywords' etc. - (font-lock-set-defaults) ;; Make sure we fontify etc. in the whole buffer. (save-restriction (widen) |