README.org: Clarify and fix the discussion of `-p', mentioning `-d'.
[runlisp] / README.org
index c0817de..b59221a 100644 (file)
@@ -3,6 +3,7 @@
 #+AUTHOR: Mark Wooding
 #+LaTeX_CLASS: strayman
 #+LaTeX_HEADER: \usepackage{tikz, gnuplot-lua-tikz}
+#+EXPORT_FILE_NAME: doc/README.pdf
 
 ~runlisp~ is a small C program intended to be run from a script ~#!~
 line.  It selects and invokes a Common Lisp implementation, so as to run
@@ -14,7 +15,7 @@ Currently, the following Lisp implementations are supported:
   + Armed Bear Common Lisp (~abcl~),
   + Clozure Common Lisp (~ccl~),
   + GNU CLisp (~clisp~),
-  + Carnegie--Mellon Univerity Common Lisp (~cmucl~), and
+  + Carnegie--Mellon Univerity Common Lisp (~cmucl~),
   + Embeddable Common Lisp (~ecl~), and
   + Steel Bank Common Lisp (~sbcl~).
 
@@ -150,24 +151,32 @@ command-line interface for evaluating Lisp forms.  For example:
 : 3
 
 If your build script needs to get information out of Lisp, then wrapping
-~format~, or even ~prin1~, around forms is annoying; so ~runlisp~ has a
+~format~, or even ~princ~, around forms is annoying; so ~runlisp~ has a
 ~-p~ option which prints the values of the forms it evaluates.
 
 : $ runlisp -e '(+ 1 2)'
 : 3
 
-If a form produces multiple values, then ~-p~ will print all of them
-separated by spaces, on a single line:
+If a form produces multiple values, then ~-p~ will print all of them, as
+if by ~princ~, separated by spaces, on a single line:
 
 : $ runlisp -p '(floor 5 2)'
 : 2 1
 
+There's also a ~-d~ option, which does the same thing as ~-p~, only it
+prints values as if by ~prin1~.  For example,
+
+: $ runlisp -p '"Hello, world!"'
+: Hello, world!
+: runlisp -d '"Hello, world!"'
+: "Hello, world!"
+
 In addition to evaluating forms with ~-e~, and printing their values
-with ~-p~, you can also load a file of Lisp code using ~-l~.
+with ~-d~ and ~-p~, you can also load a file of Lisp code using ~-l~.
 
 When ~runlisp~ is acting on ~-e~, ~-p~, and/or ~-l~ options, it's said
 to be running in /eval/ mode, rather than its usual /script/ mode.  In
-script mode, it /doesn't/ set ~:runlisp-script~ in ~*features*~.
+eval mode, it /doesn't/ set ~:runlisp-script~ in ~*features*~.
 
 You can still insist that ~runlisp~ use a particular Lisp
 implementation, or one of a subset of implementations, using the ~-L~
@@ -373,7 +382,7 @@ Let's take this in slightly larger pieces.
 
     The thing we haven't seen before is ~${@IMAGENEW|q}~.  The
     ~@IMAGENEW~ setting is defined by the ~dump-runlisp-image~ program
-    the name the file in which the new image should be
+    to name the file in which the new image should be
     saved.[fn:image-rename]  The ~|q~ `filter' is new: it means that the
     filename should be escaped suitable for inclusion in a Lisp quoted
     string, by prefixing each ~\~ or ~"~ with a ~\~.
@@ -562,7 +571,7 @@ scripts.
 level of shell integration for all its supported Lisp implementations.
 In particular:
 
-  + It ensures that the standard Unix `stdin', `stdout', and `stdarr'
+  + It ensures that the standard Unix `stdin', `stdout', and `stderr'
     file descriptors are hooked up to the Lisp ~*standard-input*~,
     ~*standard-output*~, and ~*error-output*~ streams.