[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 712ef988c3 4/5: org-fold-core-region: Fix removing
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 712ef988c3 4/5: org-fold-core-region: Fix removing non-fold overlays |
Date: |
Sat, 16 Mar 2024 06:58:53 -0400 (EDT) |
branch: externals/org
commit 712ef988c3e1e11895812c21b7881bd8f66e4521
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-fold-core-region: Fix removing non-fold overlays
* lisp/org-fold-core.el (org-fold-core-region): Do not clear all the
overlays in region when unfolding and when SPEC-OR-ALIAS is nil.
Reported-by: Bruno Barbier <brubar.cs@gmail.com>
Link: https://orgmode.org/list/65f4a408.df0a0220.5debf.2c65@mx.google.com
---
lisp/org-fold-core.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el
index c99ab2f519..047dffed04 100644
--- a/lisp/org-fold-core.el
+++ b/lisp/org-fold-core.el
@@ -1071,8 +1071,9 @@ If SPEC-OR-ALIAS is omitted and FLAG is nil, unfold
everything in the region."
(when org-fold-core--isearch-active
(cl-pushnew ov org-fold-core--isearch-overlays)))))
(overlays-in from to))
- (remove-overlays from to 'org-invisible spec)
- (remove-overlays from to 'invisible spec)))
+ (when spec
+ (remove-overlays from to 'org-invisible spec)
+ (remove-overlays from to 'invisible spec))))
(if flag
(if (not spec)
(error "Calling `org-fold-core-region' with missing SPEC")