diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index 9fc029ec58..131d719fad 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -1652,7 +1652,8 @@ hfy-fontify-buffer
SRCDIR, if set, is the directory being htmlfontified.
FILE, if set, is the file name."
(if srcdir (setq srcdir (directory-file-name srcdir)))
- (let* ( (html-buffer (hfy-buffer))
+ (let* ( (inhibit-read-only t)
+ (html-buffer (hfy-buffer))
(css-sheet nil)
(css-map nil)
(invis-ranges nil)