1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 12:20:20 +02:00

trace: limit length of "| | | "... prefix

* module/system/vm/trace.scm (build-prefix): New helper.
  (print-application, print-return): Use the helper.
  (trace-calls-to-procedure, trace-calls-in-procedure):
  (trace-instructions-in-procedure, call-with-trace): Add #:max-indent
  argument, defaulting to the terminal width less 40 characters.

* doc/ref/scheme-using.texi: Update `trace' docs.

Based on a patch by Nala Ginrut.
This commit is contained in:
Andy Wingo 2013-01-16 13:20:54 +01:00
parent 3404ada0a6
commit 36c210d14e
2 changed files with 59 additions and 46 deletions

View file

@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
@c Copyright (C) 2006, 2010, 2011, 2012
@c Copyright (C) 2006, 2010, 2011, 2012, 2013
@c Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
@ -298,8 +298,13 @@ Time execution.
Profile execution.
@end deffn
@deffn {REPL Command} trace exp
@deffn {REPL Command} trace exp [#:width w] [#:max-indent i]
Trace execution.
By default, the trace will limit its width to the width of your
terminal, or @var{width} if specified. Nested procedure invocations
will be printed farther to the right, though if the width of the
indentation passes the @var{max-indent}, the indentation is abbreviated.
@end deffn
@node Debug Commands