branch: externals/ergoemacs-mode
commit 81466b3b76409f55fc62a709051237b885c1ee0a
Author: Matthew Fidler <514778+mattfid...@users.noreply.github.com>
Commit: Matthew Fidler <514778+mattfid...@users.noreply.github.com>

    Unwind protect the timer #505
---
 ergoemacs-command-loop.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ergoemacs-command-loop.el b/ergoemacs-command-loop.el
index 290e09a..7d2c449 100644
--- a/ergoemacs-command-loop.el
+++ b/ergoemacs-command-loop.el
@@ -1748,9 +1748,10 @@ They don't exactly behave like their Emacs equivalents."
   "Timer to startup `ergoemacs-mode' command loop.")
 (defun ergoemacs-command-loop--timer ()
   "Start `ergoemacs-command-loop--internal' if not currently running."
-  (unless (and (ergoemacs-command-loop-full-p)
-               (ergoemacs-command-loop-p))
-    (ergoemacs-command-loop--internal)))
+  (unwind-protect
+      (unless (and (ergoemacs-command-loop-full-p)
+                   (ergoemacs-command-loop-p))
+        (ergoemacs-command-loop--internal))))
 
 (defun ergoemacs-command-loop--install-timer ()
   "Install the `ergoemacs-command-loop--timer'."

Reply via email to