From e547d71e2cfd9d8e95a044c06ceb1db8fb3a3fee Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 15 Dec 1994 16:30:39 +0000 Subject: [PATCH] (font-lock-hack-keywords): Turn off undo generation. (font-lock-unfontify-region. font-lock-fontify-region): Likewise. --- lisp/font-lock.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 5c23041c3a6..a737e0452f2 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -335,6 +335,8 @@ the face is also set; its value is the face name." (beginning-of-line) (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name))) (let ((buffer-read-only nil) + ;; Suppress all undo activity. + (buffer-undo-list t) (modified (buffer-modified-p)) (cstart (if comment-start-skip (concat "\\s\"\\|" comment-start-skip) @@ -449,6 +451,7 @@ the face is also set; its value is the face name." (defun font-lock-unfontify-region (beg end) (let ((modified (buffer-modified-p)) + (buffer-undo-list t) (buffer-read-only nil)) (remove-text-properties beg end '(face nil)) (set-buffer-modified-p modified))) @@ -491,6 +494,7 @@ the face is also set; its value is the face name." (keywords font-lock-keywords) (count 0) (buffer-read-only nil) + (buffer-undo-list t) (modified (buffer-modified-p)) (old-syntax (syntax-table)) (bufname (buffer-name))) -- 2.39.5