From 085cc7ae79ff3649dbe9a53bb6a9ca26f30d58f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pit-Claudel?= Date: Thu, 28 Oct 2021 11:09:55 -0400 Subject: [PATCH] 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*?' --- lisp/org-src.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index f1948bfa9..51dde602d 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -642,7 +642,8 @@ org-src-font-lock-fontify-block (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)) -- 2.25.1