From d059d67fdc1e547f6d55b2883e5b0cc2f14f0380 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 6 Dec 2015 18:26:09 -0600 Subject: [PATCH] agenda: Various %port-foo enhancements Export port-remove stuff, add %8sync-port-remove, and fix %port-request and %port-remove-request * 8sync/agenda.scm (%8sync-port-remove): new variable (%port-remove-request, %8sync-port-remove): exported (%port-request, %port-remove-request): Fixed calls to make-run-request --- 8sync/agenda.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/8sync/agenda.scm b/8sync/agenda.scm index eba0139..da39845 100644 --- a/8sync/agenda.scm +++ b/8sync/agenda.scm @@ -70,8 +70,9 @@ run-it wrap wrap-apply run run-at run-delay - %run %run-at %run-delay %port-request - %8sync-run %8sync-run-at %8sync-run-delay %8sync-port + %run %run-at %run-delay %port-request %port-remove-request + %8sync-run %8sync-run-at %8sync-run-delay + %8sync-port %8sync-port-remove catch-8sync catch-%8sync @@ -564,13 +565,13 @@ return the wrong thing via (%8sync) and trip themselves up." (make-async-request (lambda (kont) (list (make-port-request port port-request-args ...) - (make-run-request kont))))) + (make-run-request kont #f))))) (define-syntax-rule (%port-remove-request port) (make-async-request (lambda (kont) (list (make-port-remove-request port) - (make-run-request kont))))) + (make-run-request kont #f))))) ;; Sugar @@ -590,6 +591,10 @@ return the wrong thing via (%8sync) and trip themselves up." "Sugar for (%8sync (%port-request ...))" (%8sync (%port-request rest ...))) +(define-syntax-rule (%8sync-port-remove rest ...) + "Sugar for (%8sync (%port-remove-request ...))" + (%8sync (%port-remove-request rest ...))) + ;; TODO: Write (%run-immediately) -- 2.31.1