branch: externals/org-modern
commit 8afea0fec48b998ae828a3170c1da5f49fbd8141
Author: JD Smith <93749+jdtsm...@users.noreply.github.com>
Commit: JD Smith <93749+jdtsm...@users.noreply.github.com>

    disable org-modern-indent if 5 init tries exceeded in a buffer
---
 org-modern-indent.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/org-modern-indent.el b/org-modern-indent.el
index c19771a080..17e7ee3586 100644
--- a/org-modern-indent.el
+++ b/org-modern-indent.el
@@ -170,8 +170,10 @@ returned."
       (if org-modern-indent--init
          (let ((cnt (cl-incf (cadr org-modern-indent--init))))
            (if (> cnt 5)
-               (user-error
-                "org-modern-indent: Gave up waiting for %s to initialize" buf)
+               (progn
+                 (org-modern-indent-mode -1)
+                 (user-error
+                  "org-modern-indent: Gave up waiting for %s to initialize" 
buf))
              (timer-activate (timer-set-time (car org-modern-indent--init)
                                              (time-add (current-time) 0.2)))))
        (setq

Reply via email to