From d63ba6ff74145b8b9b5b4df73ab1b6bb971b30e9 Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Sun, 4 Jun 2023 18:41:32 -0400 Subject: bin: Allow main file to be loaded without executing main. Call main from the shebang command instead of calling it directly. This allows us to run "guile -l bin/tissue" without actually running main. This seems to be important for Emacs Geiser as it freezes up without this fix. * bin/tissue: Call main from shebang. Do not call main directly. (main): Accept args as regular argument instead of as a rest argument. Signed-off-by: Arun Isaac --- bin/tissue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/tissue b/bin/tissue index 31ec574..afad9e4 100755 --- a/bin/tissue +++ b/bin/tissue @@ -1,6 +1,6 @@ #!/usr/bin/env sh # -*- mode: scheme; -*- -exec guile --no-auto-compile -s "$0" "$@" +exec guile --no-auto-compile -e main -s "$0" "$@" !# ;;; tissue --- Text based issue tracker @@ -489,7 +489,7 @@ Pull latest from upstream repositories. hostname) (exit #f))))))))) -(define (main . args) +(define (main args) (guard (c ((condition-git-error c) => (lambda (git-error) (display (git-error-message git-error) (current-error-port)) @@ -549,6 +549,4 @@ Pull latest from upstream repositories. args)))))) ;; tissue is an alias for `tissue search' ((_) - (main "tissue" "search"))))) - -(apply main (command-line)) + (main '("tissue" "search")))))) -- cgit v1.2.3