emacs-orgmode
[Top][All Lists]
Advanced

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

[PATCH v2 36/38] org-macs.el: Fix fontification checks take 2---


From: Ihor Radchenko
Subject: [PATCH v2 36/38] org-macs.el: Fix fontification checks take 2---
Date: Wed, 20 Apr 2022 21:28:31 +0800

---
 lisp/org-macs.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index c71bb4094..9e24e315a 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -1192,7 +1192,8 @@ (defun org-buffer-substring-fontified (beg end)
   "Return fontified region between BEG and END."
   (when (bound-and-true-p jit-lock-mode)
     (org-with-forced-fontification
-        (when (text-property-not-all beg end 'org-fold-core-fontified t)
+        (when (or (text-property-not-all beg end 'org-fold-core-fontified t)
+                  (text-property-not-all beg end 'fontified t))
           (save-match-data (font-lock-fontify-region beg end)))))
   (buffer-substring beg end))
 
@@ -1201,9 +1202,12 @@ (defun org-looking-at-fontified (re)
   (prog1 (looking-at re)
     (when (bound-and-true-p jit-lock-mode)
       (org-with-forced-fontification
-          (when (text-property-not-all
-                 (match-beginning 0) (match-end 0)
-                 'org-fold-core-fontified t)
+          (when (or (text-property-not-all
+                     (match-beginning 0) (match-end 0)
+                     'org-fold-core-fontified t)
+                    (text-property-not-all
+                     (match-beginning 0) (match-end 0)
+                     'fontified t))
             (save-match-data
               (font-lock-fontify-region (match-beginning 0)
                                 (match-end 0))))))))
-- 
2.35.1



-- 
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong 
University, Xi'an, China
Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg



reply via email to

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