diff options
author | Arun Isaac | 2025-01-21 14:05:34 +0000 |
---|---|---|
committer | Arun Isaac | 2025-01-21 14:05:34 +0000 |
commit | 5c590fd935c0c606dced5b0765eabead417a929b (patch) | |
tree | 2edc9c2982be8fdc3352c551f0aa60a8d96f0c9d | |
parent | 631ca04925a7f65caea4abdddf599a1964ce4d35 (diff) | |
download | ravanan-5c590fd935c0c606dced5b0765eabead417a929b.tar.gz ravanan-5c590fd935c0c606dced5b0765eabead417a929b.tar.lz ravanan-5c590fd935c0c606dced5b0765eabead417a929b.zip |
utils: Delete unused call-with-temporary-file.
* ravanan/utils.scm (call-with-temporary-file): Delete function.
-rw-r--r-- | ravanan/utils.scm | 11 |
1 files changed, 0 insertions, 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." |