From 366b3eccd62efea41cafd8f943b561799a6ab9b2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 26 Oct 1993 20:46:34 +0000 Subject: [PATCH] (font-lock-fontify-buffer): Don't turn font-lock-mode on and off; just call font-lock-set-defaults. --- lisp/font-lock.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index ae8d5764e5d..a2b5b7d1c4e 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -390,7 +390,7 @@ This can take a while for large buffers." (font-lock-verbose (or font-lock-verbose (interactive-p)))) (if font-lock-verbose (message "Fontifying %s..." (buffer-name))) ;; Turn it on to run hooks and get the right font-lock-keywords. - (or was-on (font-lock-mode 1)) + (or was-on (font-lock-set-defaults)) (font-lock-unfontify-region (point-min) (point-max)) (if font-lock-verbose (message "Fontifying %s... (syntactically...)" (buffer-name))) @@ -400,7 +400,6 @@ This can take a while for large buffers." (if font-lock-verbose (message "Fontifying %s... (regexps...)" (buffer-name))) (font-lock-hack-keywords (point-min) (point-max) font-lock-verbose)) - (or was-on (font-lock-mode 0)) ; turn it off if it was off. (set (make-local-variable 'font-lock-fontified) t) (if font-lock-verbose (message "Fontifying %s... done." (buffer-name))) )) -- 2.39.5