Explicitly set buffer-file-coding of the preview buffer to no-conversion

This commit is contained in:
Jian Wang 2022-10-24 10:23:24 +02:00
parent ea45a13707
commit 5fee654f11
1 changed files with 3 additions and 0 deletions

View File

@ -491,6 +491,9 @@ to choose where to display it."
(buf (get-buffer-create plantuml-preview-buffer))
(coding-system-for-read (and imagep 'binary))
(coding-system-for-write (and imagep 'binary)))
(when imagep
(with-current-buffer buf
(set-buffer-file-coding-system 'no-conversion)))
(plantuml-exec-mode-preview-string prefix (plantuml-get-exec-mode) string buf)))
(defun plantuml-preview-buffer (prefix)