From 21ac80ab5f61689eaffff3316dfbbafe4ecde636 Mon Sep 17 00:00:00 2001 From: forcer Date: Tue, 20 Sep 2005 19:26:00 +0000 Subject: later-do.el: Run timer after function did run to avoid stacking darcs-hash:20050920192602-2189f-1edaca802ff8727f0ef077ca99217aa6b6a2f174.gz --- later-do.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/later-do.el b/later-do.el index 6066e10..d31feb4 100644 --- a/later-do.el +++ b/later-do.el @@ -25,7 +25,7 @@ ;;; Code: -(defvar later-do-version "0.2emms1 (2005-09-20)" +(defvar later-do-version "0.2emms2 (2005-09-20)" "Version string of later-do.") (defgroup later-do nil @@ -61,13 +61,14 @@ sequence it was added." empty." (if (null later-do-list) (setq later-do-timer nil) - (setq later-do-timer (run-with-timer later-do-interval - nil - 'later-do-timer)) (let ((fun (caar later-do-list)) (args (cdar later-do-list))) (setq later-do-list (cdr later-do-list)) - (apply fun args)))) + (unwind-protect + (apply fun args) + (setq later-do-timer (run-with-timer later-do-interval + nil + 'later-do-timer)))))) (provide 'later-do) ;;; later-do.el ends here -- cgit v1.2.3