[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 66528468a1: org-src-font-lock-fontify-block: Do not
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 66528468a1: org-src-font-lock-fontify-block: Do not transfer non-existing properties |
Date: |
Fri, 27 May 2022 21:57:42 -0400 (EDT) |
branch: externals/org
commit 66528468a1bcef05ee6feec894c559d796298ac1
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org-src-font-lock-fontify-block: Do not transfer non-existing properties
* lisp/org-src.el (org-src-font-lock-fontify-block): Never set
font-lock properties when `get-text-property' returns nil. This
usually means that the property is not present in the position
property list. The old behavior could, for example, set 'invisible
property to nil explicitly and prevent folding completely.
Fixes
https://list.orgmode.org/CA+G3_PN6RvcRcvN2fM=vfK1K6UsT=nNPJ7SUucmA1Ypc=Emorg@mail.gmail.com/T/#u
---
lisp/org-src.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/org-src.el b/lisp/org-src.el
index cc49181618..006217f70f 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -643,9 +643,10 @@ as `org-src-fontify-natively' is non-nil."
;; preserve, e.g., composition.
(dolist (prop (cons 'face font-lock-extra-managed-props))
(let ((new-prop (get-text-property pos prop)))
- (put-text-property
- (+ start (1- pos)) (1- (+ start next)) prop new-prop
- org-buffer)))
+ (when new-prop
+ (put-text-property
+ (+ start (1- pos)) (1- (+ start next)) prop new-prop
+ org-buffer))))
(setq pos next)))
(set-buffer-modified-p nil))
;; Add Org faces.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org 66528468a1: org-src-font-lock-fontify-block: Do not transfer non-existing properties,
ELPA Syncer <=