# HG changeset patch # User Richard M. Stallman # Date 790994605 0 # Node ID cbd9cef03245721147224fb1f5fd4765483fb073 # Parent eeeae6ef626e8824e42156e19a21875cf1528b31 (font-lock-fontify-region): Bind inhibit-read-only. Also buffer-file-name. (font-lock-hack-keywords, font-lock-unfontify-region): Likewise. diff -r eeeae6ef626e -r cbd9cef03245 lisp/font-lock.el --- a/lisp/font-lock.el Wed Jan 25 00:41:22 1995 +0000 +++ b/lisp/font-lock.el Wed Jan 25 00:43:25 1995 +0000 @@ -334,7 +334,9 @@ (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 @@ (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 @@ (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))