[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GUILE_QUIET=1 guile → suppress REPL welcome message (fixed message f
From: |
Dr. Arne Babenhauserheide |
Subject: |
Re: GUILE_QUIET=1 guile → suppress REPL welcome message (fixed message format) |
Date: |
Tue, 09 Jan 2024 16:50:36 +0100 |
User-agent: |
mu4e 1.10.8; emacs 30.0.50 |
Sorry for the broken message. Re-sending in mu4e produced strange artifacts.
Here’s a clean version:
------
Hello,
the following patch makes Guile suppress the repl-welcome message when
the GUILE_QUIET environment variable is set.
From 5af642cb967942c7cb46b773431a44ceae1e7cbe Mon Sep 17 00:00:00 2001
From: Arne Babenhauserheide <arne_bab@web.de>
Date: Tue, 9 Jan 2024 14:40:30 +0100
Subject: [PATCH] GUILE_QUIET: suppress repl-welcome when GUILE_QUIET env is
set
* module/system/repl/repl.scm (run-repl*): print welcome *unless* GUILE_QUIET
is set
* doc/ref/guile-invoke.texi (Environment Variables): document GUILE_QUIET
---
doc/ref/guile-invoke.texi | 5 +++++
module/system/repl/repl.scm | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/doc/ref/guile-invoke.texi b/doc/ref/guile-invoke.texi
index 856bce7b8..2e41d3afb 100644
--- a/doc/ref/guile-invoke.texi
+++ b/doc/ref/guile-invoke.texi
@@ -424,6 +424,11 @@ Guile uses the environment variable @env{HOME}, the name
of your home
directory, to locate various files, such as @file{.guile} or
@file{.guile_history}.
+@item GUILE_QUIET
+@vindex GUILE_QUIET
+The Guile REPL usually shows a startup message. When the environment
+variable @env{GUILE_QUIET} is set, this message is suppressed.
+
@item GUILE_JIT_THRESHOLD
@vindex GUILE_JIT_THRESHOLD
Guile has a just-in-time (JIT) code generator that makes running Guile
diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm
index d83d28759..0fb71ca1c 100644
--- a/module/system/repl/repl.scm
+++ b/module/system/repl/repl.scm
@@ -159,7 +159,8 @@
(% (with-fluids ((*repl-stack*
(cons repl (or (fluid-ref *repl-stack*) '()))))
(if (null? (cdr (fluid-ref *repl-stack*)))
- (repl-welcome repl))
+ (unless (getenv "GUILE_QUIET")
+ (repl-welcome repl)))
(let prompt-loop ()
(let ((exp (prompting-meta-read repl)))
(cond
--
2.41.0
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
signature.asc
Description: PGP signature