From: Richard M. Stallman Date: Wed, 25 Jan 1995 00:43:25 +0000 (+0000) Subject: (font-lock-fontify-region): Bind inhibit-read-only. Also buffer-file-name. X-Git-Tag: emacs-19.34~5313 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3de76c480c9fff0f4e5d6ad1c617c9ca93860177;p=emacs.git (font-lock-fontify-region): Bind inhibit-read-only. Also buffer-file-name. (font-lock-hack-keywords, font-lock-unfontify-region): Likewise. --- diff --git a/lisp/font-lock.el b/lisp/font-lock.el index a737e0452f2..ac36725aa77 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -334,7 +334,9 @@ the face is also set; its value is the face name." (goto-char start) (beginning-of-line) (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name))) - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) + ;; Prevent warnings if the disk file has been altered. + (buffer-file-name) ;; Suppress all undo activity. (buffer-undo-list t) (modified (buffer-modified-p)) @@ -452,7 +454,9 @@ 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)) + (inhibit-read-only t) + ;; Prevent warnings if the disk file has been altered. + (buffer-file-name)) (remove-text-properties beg end '(face nil)) (set-buffer-modified-p modified))) @@ -493,7 +497,9 @@ the face is also set; its value is the face name." (let ((case-fold-search font-lock-keywords-case-fold-search) (keywords font-lock-keywords) (count 0) - (buffer-read-only nil) + ;; Prevent warnings if the disk file has been altered. + (buffer-file-name) + (inhibit-read-only t) (buffer-undo-list t) (modified (buffer-modified-p)) (old-syntax (syntax-table))