mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(font-lock-mode): Add font-lock-unfontify-buffer
to change-major-mode-hook when font lock is enabled.
This commit is contained in:
parent
64d18e8f14
commit
8e97108f6b
1 changed files with 5 additions and 1 deletions
|
|
@ -206,7 +206,11 @@ your own function which is called when `font-lock-mode' is toggled via
|
|||
;; batch job) or if the buffer is invisible (the name starts with a space).
|
||||
(when (or noninteractive (eq (aref (buffer-name) 0) ?\ ))
|
||||
(setq font-lock-mode nil))
|
||||
(funcall font-lock-function font-lock-mode))
|
||||
(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)))
|
||||
|
||||
(defun font-lock-default-function (font-lock-mode)
|
||||
;; Turn on Font Lock mode.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue