diff options
-rw-r--r-- | sly/signal.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sly/signal.scm b/sly/signal.scm index a35f042..5bd9a29 100644 --- a/sly/signal.scm +++ b/sly/signal.scm @@ -116,8 +116,12 @@ procedure PROC, and a list of INPUTS." (define (add-signal-hook! signal proc) "Add PROC, a procedure that accepts a single argument, to the hook associated with SIGNAL. When SIGNAL receives a new value, PROC will -be applied with that value." - (add-hook! (signal-hook (signal-unbox signal)) proc)) +be applied with that value. PROC will automatically be called once +after registering it to run the hook with the current value of +SIGNAL." + (add-hook! (signal-hook (signal-unbox signal)) proc) + ;; Run the initial hook. + (proc (signal-ref signal))) (define (remove-signal-hook! signal proc) "Remove the procedure PROC from the hook associated with SIGNAL." |