emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org ebd06c1: org-src: Reset buffer-modified-p after fon


From: ELPA Syncer
Subject: [elpa] externals/org ebd06c1: org-src: Reset buffer-modified-p after fontifying
Date: Sun, 21 Nov 2021 02:57:35 -0500 (EST)

branch: externals/org
commit ebd06c15b5bb44070a5a9a7fbf17e1fef41c7521
Author: Clément Pit-Claudel <cpitclaudel@gmail.com>
Commit: TEC <tec@tecosaur.com>

    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 f1948bf..51dde60 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]