From 6c796a33c522622067ebd6cb853d8743d1787e73 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 13 May 2019 18:47:27 -0400 Subject: doc: Remove reference to old hook system. * doc/api.texi (Agendas): Rewrite example code that used obsolete hook API. --- doc/api.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api.texi b/doc/api.texi index 8e3ba98..33c9759 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -2604,11 +2604,12 @@ the current time. This is where @code{after} comes in handy: Time units in the agenda are in no way connected to real time. It's up to the programmer to decide what agenda time means. A simple and -effective approach is to map each call of the update hook +effective approach is to map each call of the update procedure (@pxref{Kernel}) to 1 unit of agenda time, like so: @example -(add-hook! update-hook (lambda (dt) (update-agenda 1))) +(define (update dt) + (update-agenda 1)) @end example It is important to call @code{update-agenda} periodically, otherwise -- cgit v1.2.3