1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

default-frame-width is a parameter

* module/system/repl/debug.scm (default-frame-width): A parameter
instead of a fluid.
(print-frames): Adapt use.
This commit is contained in:
Andy Wingo 2024-01-29 10:59:54 +01:00
parent 1349c41a60
commit bb5829f5ff

View file

@ -1,6 +1,6 @@
;;; Guile VM debugging facilities ;;; 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 ;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public ;;; 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 ;; Maximum number of columns filled by 'print-frames' when writing to
;; a port that is not a terminal. This is a purposefully large value ;; a port that is not a terminal. This is a purposefully large value
;; to avoid losing important debugging info. ;; 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 #:key
(width (if (isatty? port) (width (if (isatty? port)
(terminal-width) (terminal-width)
(fluid-ref default-frame-width))) (default-frame-width)))
(full? #f) (full? #f)
(forward? #f) count) (forward? #f) count)
(let* ((len (vector-length frames)) (let* ((len (vector-length frames))