diff --git a/lisp/org-list.el b/lisp/org-list.el index bc8c5012b..0e52e9955 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -2615,11 +2615,12 @@ With optional prefix argument ALL, do this for the whole buffer." (checked (nth 3 cookie)) (total (nth 4 cookie))) (goto-char beg) - (insert - (if percent (format "[%d%%]" (floor (* 100.0 checked) - (max 1 total))) - (format "[%d/%d]" checked total))) - (delete-region (point) (+ (point) (- end beg))) + (org-fold-core-ignore-modifications + (insert-and-inherit + (if percent (format "[%d%%]" (floor (* 100.0 checked) + (max 1 total))) + (format "[%d/%d]" checked total))) + (delete-region (point) (+ (point) (- end beg)))) (when org-auto-align-tags (org-fix-tags-on-the-fly))))))) (defun org-get-checkbox-statistics-face ()