[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/04: Create procedure to enable silencing the Guile we
From: |
Arne Babenhauserheide |
Subject: |
[Guile-commits] 03/04: Create procedure to enable silencing the Guile welcome message. * module/system/repl/repl.scm: add parameter `%inhibit-welcome-message' * module/system/repl/repl.scm(run-repl*): add condition for calling procedure repl-welcome: if (%inhibit-welcome-message) is `#t', don't |
Date: |
Sat, 12 Oct 2024 08:07:53 -0400 (EDT) |
arnebab pushed a commit to branch main
in repository guile.
commit 8d21dd7eb800868909b694c774015291f8e3aa90
Author: Matthew Wette <mwette@alumni.caltech.edu>
AuthorDate: Mon Oct 7 17:28:27 2024 -0700
Create procedure to enable silencing the Guile welcome message. *
module/system/repl/repl.scm: add parameter `%inhibit-welcome-message' *
module/system/repl/repl.scm(run-repl*): add condition for calling procedure
repl-welcome: if (%inhibit-welcome-message) is `#t', don't
---
module/system/repl/repl.scm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm
index d83d28759..fc525b547 100644
--- a/module/system/repl/repl.scm
+++ b/module/system/repl/repl.scm
@@ -26,7 +26,7 @@
#:use-module (system repl common)
#:use-module (system repl command)
#:use-module (ice-9 control)
- #:export (start-repl run-repl))
+ #:export (start-repl run-repl %inhibit-welcome-message))
;;;
@@ -127,6 +127,11 @@
;;; The repl
;;;
+;; Provide a hook for users to inhibit the welcome message.
+;; For example, .guile might include
+;; ((@ (system repl repl) %inhibit-welcome-message) #f)
+(define %inhibit-welcome-message (make-parameter #f))
+
(define* (start-repl #:optional (lang (current-language)) #:key debug)
(start-repl* lang debug prompting-meta-read))
@@ -158,7 +163,8 @@
(% (with-fluids ((*repl-stack*
(cons repl (or (fluid-ref *repl-stack*) '()))))
- (if (null? (cdr (fluid-ref *repl-stack*)))
+ (if (and (null? (cdr (fluid-ref *repl-stack*)))
+ (not (%inhibit-welcome-message)))
(repl-welcome repl))
(let prompt-loop ()
(let ((exp (prompting-meta-read repl)))
- [Guile-commits] branch main updated (9b1effb58 -> c0bfa3219), Arne Babenhauserheide, 2024/10/12
- [Guile-commits] 03/04: Create procedure to enable silencing the Guile welcome message. * module/system/repl/repl.scm: add parameter `%inhibit-welcome-message' * module/system/repl/repl.scm(run-repl*): add condition for calling procedure repl-welcome: if (%inhibit-welcome-message) is `#t', don't,
Arne Babenhauserheide <=
- [Guile-commits] 01/04: Fix typo in naming function set-current-output-port * libguile/ports.c(scm_set_current_output_port): scheme name is set-current-output-port, Arne Babenhauserheide, 2024/10/12
- [Guile-commits] 04/04: fix typo in comment, Arne Babenhauserheide, 2024/10/12
- [Guile-commits] 02/04: Redirect diagnostice output messages (e.g., auto-compiling code) to a newly defined current-info-port, and add a command line argument `-I' to set the current-info-port to a void-port. * libguile/ports.c: add cur_infoport_fluid, scm_current_info_port, scm_set_current_info_port; define default current-info-port to stderr * libguile/load.c(compiled_is_fresh,load_thunk_from_path, do_try_auto_compile,scm_sys_warn_auto_compilation_enabled, scm_primitive_load_path): direct output messages to cur [...], Arne Babenhauserheide, 2024/10/12