org-src: Reset buffer-modified-p after fontifying

* lisp/org-src.el (org-src-font-lock-fontify-block): Reset the
modification flag of the temporary fontification buffer after
fontifying.

Without this some modes cause Emacs to prompt about unsaved buffers
when exiting: "Save buffer *org-src-fontification:...-mode*?".
This commit is contained in:
Clément Pit-Claudel 2021-10-28 11:24:37 -04:00 committed by TEC
parent 27edae8ced
commit ebd06c15b5
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 2 additions and 1 deletions

View File

@ -642,7 +642,8 @@ as `org-src-fontify-natively' is non-nil."
(put-text-property
(+ start (1- pos)) (1- (+ start next)) prop new-prop
org-buffer)))
(setq pos next))))
(setq pos next)))
(set-buffer-modified-p nil))
;; Add Org faces.
(let ((src-face (nth 1 (assoc-string lang org-src-block-faces t))))
(when (or (facep src-face) (listp src-face))