From 5c590fd935c0c606dced5b0765eabead417a929b Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 21 Jan 2025 14:05:34 +0000 Subject: utils: Delete unused call-with-temporary-file. * ravanan/utils.scm (call-with-temporary-file): Delete function. --- ravanan/utils.scm | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/ravanan/utils.scm b/ravanan/utils.scm index c9294cd..a76a14c 100644 --- a/ravanan/utils.scm +++ b/ravanan/utils.scm @@ -22,7 +22,6 @@ #:use-module (ice-9 filesystem) #:use-module (ice-9 match) #:export (string-trim-prefix - call-with-temporary-file load-script)) (define (string-trim-prefix prefix str) @@ -31,16 +30,6 @@ (substring str (string-length prefix)) str)) -(define* (call-with-temporary-file proc #:optional (parent-directory (getcwd))) - "Call @var{proc} with an output port to a new temporary file in -@var{parent-directory}, and delete it when @var{proc} returns or exits -non-locally." - (let ((temporary-file-port (mkstemp (string-append parent-directory "/XXXXXX")))) - (dynamic-wind (const #t) - (cut proc temporary-file-port) - (lambda () - (delete-file (port-filename temporary-file-port)))))) - (define* (load-script script-file #:key (modules '())) "Load script from @var{script-file} and return its value. Import @var{modules} before loading script." -- cgit v1.2.3