summaryrefslogtreecommitdiff
path: root/libguile/script.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-03-12 11:54:26 +0100
committerAndy Wingo <wingo@pobox.com>2010-03-12 11:54:26 +0100
commit32ce4058db1adc319dabf6f93143cb367f7456fc (patch)
tree3927882fbc55267ec9c2bf82df1da93fd5329e0a /libguile/script.c
parent9f0745183605c4f2997b95c421637678ca5e5e2a (diff)
downloadguile-32ce4058db1adc319dabf6f93143cb367f7456fc.tar.gz
prompt around REPL evaluations, and around `guile' program invocation
* module/ice-9/control.scm (%): Add a single-argument case, which instates a default prompt with a default handler. * libguile/script.c (scm_compile_shell_switches): Wrap user programs in a default prompt. * module/system/repl/common.scm (repl-eval): REPL expressions are user programs too; wrap each one in a default prompt.
Diffstat (limited to 'libguile/script.c')
-rw-r--r--libguile/script.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libguile/script.c b/libguile/script.c
index 89ff7a0c4..2f2495774 100644
--- a/libguile/script.c
+++ b/libguile/script.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 License
* as published by the Free Software Foundation; either version 3 of
@@ -740,6 +740,13 @@ scm_compile_shell_switches (int argc, char **argv)
{
SCM val = scm_cons (sym_begin, tail);
+ /* Wrap the expression in a prompt. */
+ val = scm_list_2 (scm_list_3 (scm_sym_at,
+ scm_list_2 (scm_from_locale_symbol ("ice-9"),
+ scm_from_locale_symbol ("control")),
+ scm_from_locale_symbol ("%")),
+ val);
+
#if 0
scm_write (val, SCM_UNDEFINED);
scm_newline (SCM_UNDEFINED);