diff options
author | forcer <forcer> | 2005-09-20 19:26:00 +0000 |
---|---|---|
committer | forcer <mwolson@gnu.org> | 2005-09-20 19:26:00 +0000 |
commit | 21ac80ab5f61689eaffff3316dfbbafe4ecde636 (patch) | |
tree | 9900dccf18036790f2925ee9bfd9d7eb28c83009 | |
parent | 6aef5b432ee8d76469b1b0e9df22d726836560dd (diff) |
later-do.el: Run timer after function did run to avoid stacking
darcs-hash:20050920192602-2189f-1edaca802ff8727f0ef077ca99217aa6b6a2f174.gz
-rw-r--r-- | later-do.el | 11 |
1 files 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 |