From 47b86dbf4dc3da2f4d6d41a018cd221fbf0823ee Mon Sep 17 00:00:00 2001 From: Michael Gran Date: Sun, 20 Feb 2011 21:53:46 -0800 Subject: Add ,width meta-command to set screen width in debug output This meta-command allows one to set the default number of columns that output from ,backtrace and ,locals shall occupy. * doc/ref/scheme-using.texi (Debug Commands): document ,width * module/system/repl/command.scm (*width*): new var (backtrace, locals): use *width* in optarg (width): new meta-command --- doc/ref/scheme-using.texi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/ref/scheme-using.texi') diff --git a/doc/ref/scheme-using.texi b/doc/ref/scheme-using.texi index 126b84590..a119d4218 100644 --- a/doc/ref/scheme-using.texi +++ b/doc/ref/scheme-using.texi @@ -337,6 +337,12 @@ Show the VM registers associated with the current frame. @xref{Stack Layout}, for more information on VM stack frames. @end deffn +@deffn {REPL Command} width [cols] +Sets the number of display columns in the output of @code{,backtrace} +and @code{,locals} to @var{cols}. If @var{cols} is not given, the width +of the terminal is used. +@end deffn + The next 3 commands work at any REPL. @deffn {REPL Command} break proc -- cgit v1.2.3 From 2460274d360d36bc758b763a1bbb1dc2cb85a87b Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 29 Mar 2011 12:18:20 +0200 Subject: document -q, repl options * doc/ref/scheme-scripts.texi (Invoking Guile): Document -q. * doc/ref/scheme-using.texi (Init File): New section, on .guile. (Readline): Link to Init File. (System Commands): Document the various REPL options, and repl-default-option-set!. --- doc/ref/scheme-scripts.texi | 5 +++++ doc/ref/scheme-using.texi | 54 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 54 insertions(+), 5 deletions(-) (limited to 'doc/ref/scheme-using.texi') diff --git a/doc/ref/scheme-scripts.texi b/doc/ref/scheme-scripts.texi index 5a6f494d1..0ad1becf3 100644 --- a/doc/ref/scheme-scripts.texi +++ b/doc/ref/scheme-scripts.texi @@ -196,6 +196,11 @@ interactive session. When executing a script with @code{-s} or Do not use the debugging VM engine, even when entering an interactive session. +@item -q +Do not the local initialization file, @code{.guile}. This option only +has an effect when running interactively; running scripts does not load +the @code{.guile} file. @xref{Init File}. + @item --listen[=@var{p}] While this program runs, listen on a local port or a path for REPL clients. If @var{p} starts with a number, it is assumed to be a local diff --git a/doc/ref/scheme-using.texi b/doc/ref/scheme-using.texi index a119d4218..7995c8c04 100644 --- a/doc/ref/scheme-using.texi +++ b/doc/ref/scheme-using.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 2006, 2010 +@c Copyright (C) 2006, 2010, 2011 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -35,6 +35,7 @@ current language is @code{scheme}, and the current module is support for languages other than Scheme. @menu +* Init File:: * Readline:: * Value History:: * REPL Commands:: @@ -43,6 +44,22 @@ support for languages other than Scheme. @end menu +@node Init File +@subsection The Init File, @file{~/.guile} + +@cindex .guile +When run interactively, Guile will load a local initialization file from +@file{~/.guile}. This file should contain Scheme expressions for +evaluation. + +This facility lets the user customize their interactive Guile +environment, pulling in extra modules or parameterizing the REPL +implementation. + +To run Guile without loading the init file, use the @code{-q} +command-line option. + + @node Readline @subsection Readline @@ -58,10 +75,8 @@ scheme@@(guile-user)> (activate-readline) @end lisp It's a good idea to put these two lines (without the -@code{scheme@@(guile-user)>} prompts) in your @file{.guile} file. Guile -reads this file when it starts up interactively, so anything in this -file has the same effect as if you type it in by hand at the -@code{scheme@@(guile-user)>} prompt. +@code{scheme@@(guile-user)>} prompts) in your @file{.guile} file. +@xref{Init File}, for more on @file{.guile}. @node Value History @@ -410,6 +425,35 @@ List/show/set options. Quit this session. @end deffn +Current REPL options include: + +@table @code +@item compile-options +The options used when compiling expressions entered at the REPL. +@xref{Compilation}, for more on compilation options. +@item interp +Whether to interpret or compile expressions given at the REPL, if such a +choice is available. Off by default (indicating compilation). +@item prompt +A customized REPL prompt. @code{#f} by default, indicating the default +prompt. +@item value-history +Whether value history is on or not. @xref{Value History}. +@item on-error +What to do when an error happens. By default, @code{debug}, meaning to +enter the debugger. Other values include @code{backtrace}, to show a +backtrace without entering the debugger, or @code{report}, to simply +show a short error printout. +@end table + +Default values for REPL options may be set using +@code{repl-default-option-set!} from @code{(system repl common)}: + +@deffn {Scheme Procedure} repl-set-default-option! key value +Set the default value of a REPL option. This function is particularly +useful in a user's init file. @xref{Init File}. +@end deffn + @node Error Handling @subsection Error Handling -- cgit v1.2.3