From 07c086c1b9ea74996f20339d42ca91c3411966f5 Mon Sep 17 00:00:00 2001
From: Hans Bolinder
Date: Fri, 1 Feb 2013 12:24:22 +0100
Subject: [stdlib] Add new SDTLIB application variable 'shell_strings'
Use the new function shell:strings/1 to toggle how the Erlang shell
outputs lists of integers.
---
lib/stdlib/doc/src/shell.xml | 22 ++++++++++++++++++----
lib/stdlib/doc/src/stdlib_app.xml | 9 +++++++--
lib/stdlib/src/io_lib_format.erl | 10 +++++-----
lib/stdlib/src/io_lib_pretty.erl | 6 +++---
lib/stdlib/src/shell.erl | 25 +++++++++++++++++++++----
5 files changed, 54 insertions(+), 18 deletions(-)
(limited to 'lib')
diff --git a/lib/stdlib/doc/src/shell.xml b/lib/stdlib/doc/src/shell.xml
index bc2120c37d..7f251c863e 100644
--- a/lib/stdlib/doc/src/shell.xml
+++ b/lib/stdlib/doc/src/shell.xml
@@ -4,7 +4,7 @@
- 19962011
+ 19962013
Ericsson AB. All Rights Reserved.
@@ -781,7 +781,7 @@ loop(N) ->
- catch_exception(Bool) -> Bool
+ catch_exception(Bool) -> boolean()
Sets the exception handling of the shell
Bool = boolean()
@@ -801,8 +801,8 @@ loop(N) ->
Sets the shell prompt
- Sets the shell prompt function to PromptFunc. The
- previous prompt function is returned.
+ Sets the shell prompt function to PromptFunc.
+ The previous prompt function is returned.
@@ -827,6 +827,20 @@ loop(N) ->
is meant to be called from the shell.
+
+
+ Sets the shell's string recognition flag.
+
+ Sets pretty printing of lists to Strings.
+ The previous value of the flag is returned.
+ The flag can also be set by the STDLIB application variable
+ shell_strings. The default is
+ true which means that lists of integers will be
+ printed using the string syntax, when possible. The value
+ false means that no lists will be printed using the
+ string syntax.
+
+
diff --git a/lib/stdlib/doc/src/stdlib_app.xml b/lib/stdlib/doc/src/stdlib_app.xml
index a615c1bf88..2391bb6f03 100644
--- a/lib/stdlib/doc/src/stdlib_app.xml
+++ b/lib/stdlib/doc/src/stdlib_app.xml
@@ -4,7 +4,7 @@