From bcb923013b683b80cde600a3c38c737c6830593b Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Mon, 27 Feb 2012 11:57:45 +0100 Subject: [PATCH] Issue 2360: Scheme sandbox fails to load readline module --- Documentation/extending/scheme-tutorial.itely | 7 ++++++- ly/scheme-sandbox.ly | 15 +++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Documentation/extending/scheme-tutorial.itely b/Documentation/extending/scheme-tutorial.itely index db3f09db05..c573cdf626 100644 --- a/Documentation/extending/scheme-tutorial.itely +++ b/Documentation/extending/scheme-tutorial.itely @@ -85,7 +85,12 @@ Once the sandbox is running, you will receive a guile prompt: guile> @end lisp -You can enter Scheme expressions at this prompt to experiment with Scheme. +You can enter Scheme expressions at this prompt to experiment with +Scheme. If you want to be able to use the GNU readline library for +nicer editing of the Scheme command line, check the file +@file{ly/scheme-sandbox.ly} for more information. If you already have +enabled the readline library for your interactive Guile sessions outside +of LilyPond, this should work in the sandbox as well. @node Scheme variables @subsection Scheme variables diff --git a/ly/scheme-sandbox.ly b/ly/scheme-sandbox.ly index eb38380256..a811a1d5b6 100644 --- a/ly/scheme-sandbox.ly +++ b/ly/scheme-sandbox.ly @@ -1,5 +1,16 @@ \version "2.14.0" -#(use-modules (ice-9 readline)) -#(activate-readline) + +#(load-user-init) + +% This loads the user's .guile file for interactive sessions. +% One typical thing you might want to put there is +% (use-modules (ice-9 readline)) +% (activate-readline) +% in order to activate command line editing for interactive sessions. +% You need libreadline support and the respective Guile module to be +% installed for that. In Debian, for example, this is part of the +% guile-1.8-libs package. Depending on your system and version, the +% requirements may be different. + #(newline) #(scm-style-repl) -- 2.39.2