ox-html.el: Fix read-only error when export src block

When the type of src block involve an read-only buffer (ex:
compilation mode) avoid to setup the temp buffer as read-only and
error when processing it.

* lisp/ox-html.el (org-html-fontify-code): Set `inhibit-read-only' to
avoid read-only temp buffer.
This commit is contained in:
Pierre Téchoueyres 2020-06-01 12:30:04 +02:00 committed by Kyle Meyer
parent b68090e0be
commit c631afd358
1 changed files with 2 additions and 1 deletions

View File

@ -2156,7 +2156,8 @@ is the language used for CODE, as a string, or nil."
;; htmlize
(setq code
(let ((output-type org-html-htmlize-output-type)
(font-prefix org-html-htmlize-font-prefix))
(font-prefix org-html-htmlize-font-prefix)
(inhibit-read-only t))
(with-temp-buffer
;; Switch to language-specific mode.
(funcall lang-mode)