Commit 523d3bf4 authored by Andreas Schwab's avatar Andreas Schwab
Browse files

(font-lock-change-mode): Avoid changing buffer state in any way.

parent 97acc803
2002-08-31 Andreas Schwab <>
* font-core.el (font-lock-change-mode): Avoid changing buffer
state in any way.
2002-08-30 Edward M. Reingold <>
* calendar/diary-lib.el (diary-mail-entries): Don't overwrite
......@@ -218,11 +218,20 @@ your own function which is called when `font-lock-mode' is toggled via
;; Get rid of fontification for the old major mode.
;; We do this when changing major modes.
(defun font-lock-change-mode ()
(let ((inhibit-read-only t))
(let ((inhibit-read-only t)
(inhibit-point-motion-hooks t)
(inhibit-modification-hooks t)
(deactivate-mark nil)
(buffer-file-name nil)
(buffer-file-truename nil)
(buffer-undo-list t)
(modified (buffer-modified-p)))
(point-min) (point-max) '(font-lock-face))))
(point-min) (point-max) '(font-lock-face)))
(unless modified
(restore-buffer-modified-p nil)))
(when font-lock-defaults
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