From: Richard M. Stallman Date: Mon, 19 Aug 2002 00:54:48 +0000 (+0000) Subject: (font-lock-mode): Set change-major-mode-hook locally. X-Git-Tag: ttn-vms-21-2-B4~13652 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5a705496329d47b22f6120712a7aec4fab65b70b;p=emacs.git (font-lock-mode): Set change-major-mode-hook locally. --- diff --git a/lisp/font-core.el b/lisp/font-core.el index 6becb967954..6b97afd3274 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el @@ -209,8 +209,8 @@ your own function which is called when `font-lock-mode' is toggled via (funcall font-lock-function font-lock-mode) ;; Arrange to unfontify this buffer if we change major mode later. (if font-lock-mode - (add-hook 'change-major-mode-hook 'font-lock-unfontify-buffer) - (remove-hook 'change-major-mode-hook 'font-lock-unfontify-buffer))) + (add-hook 'change-major-mode-hook 'font-lock-unfontify-buffer nil t) + (remove-hook 'change-major-mode-hook 'font-lock-unfontify-buffer t))) (defun font-lock-default-function (font-lock-mode) ;; Turn on Font Lock mode.