Remove the milliways-run timer once millways are run.

Pascal J. Bourguignon [2020-11-01 22:53]
Remove the milliways-run timer once millways are run.
Filename
pjb-milliways.el
diff --git a/pjb-milliways.el b/pjb-milliways.el
index 3c8f8e3..3440b76 100644
--- a/pjb-milliways.el
+++ b/pjb-milliways.el
@@ -38,8 +38,10 @@

 (defun milliways-run ()
   (interactive)
-  (while *milliways*
-    (ignore-errors (funcall (pop *milliways*)))))
+  (when *milliways*
+    (while *milliways*
+      (ignore-errors (funcall (pop *milliways*))))
+    (timer-delete-function 'milliways-run)))

 (defun milliways-activate (&optional delay)
   "Called at the end of ~/.emacs"
ViewGit