[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 02/02: default-frame-width is a parameter
From: |
Andy Wingo |
Subject: |
[Guile-commits] 02/02: default-frame-width is a parameter |
Date: |
Mon, 29 Jan 2024 05:01:20 -0500 (EST) |
wingo pushed a commit to branch main
in repository guile.
commit bb5829f5ffaae37764084d2cc949e9a1fd697bca
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Mon Jan 29 10:59:54 2024 +0100
default-frame-width is a parameter
* module/system/repl/debug.scm (default-frame-width): A parameter
instead of a fluid.
(print-frames): Adapt use.
---
module/system/repl/debug.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/module/system/repl/debug.scm b/module/system/repl/debug.scm
index 8109fdb1c..036481edb 100644
--- a/module/system/repl/debug.scm
+++ b/module/system/repl/debug.scm
@@ -1,6 +1,6 @@
;;; Guile VM debugging facilities
-;;; Copyright (C) 2001, 2009-2011, 2013-2015, 2023 Free Software Foundation,
Inc.
+;;; Copyright (C) 2001, 2009-2011, 2013-2015, 2023-2024 Free Software
Foundation, Inc.
;;;
;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public
@@ -76,7 +76,10 @@
;; Maximum number of columns filled by 'print-frames' when writing to
;; a port that is not a terminal. This is a purposefully large value
;; to avoid losing important debugging info.
- (make-fluid 500))
+ (make-parameter 500
+ (lambda (val)
+ (and (exact-integer? val) (positive? val)
+ val))))
@@ -148,7 +151,7 @@
#:key
(width (if (isatty? port)
(terminal-width)
- (fluid-ref default-frame-width)))
+ (default-frame-width)))
(full? #f)
(forward? #f) count)
(let* ((len (vector-length frames))