Commit 5a705496 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(font-lock-mode): Set change-major-mode-hook locally.

parent 76f03778
......@@ -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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment