[librep] Doc on Invocation.



commit c20d7e7b7c16df84783b1a44791656e1f6caf9bf
Author: Teika kazura <teika lavabit com>
Date:   Sat Jul 17 18:17:55 2010 +0900

    Doc on Invocation.

 lisp/rep/user.jl |    7 +---
 man/librep.texi  |   82 ++++++++++++++++++++++-------------------------------
 man/rep.1        |   24 +++++----------
 man/repl.texi    |    7 ++++-
 4 files changed, 50 insertions(+), 70 deletions(-)
---
diff --git a/lisp/rep/user.jl b/lisp/rep/user.jl
index 6ba1758..372a152 100644
--- a/lisp/rep/user.jl
+++ b/lisp/rep/user.jl
@@ -60,8 +60,7 @@ usage: %s [OPTIONS...]
 
 where OPTIONS are any of:
 
-    FILE		load the Lisp file FILE (from the cwd if possible,
-			 implies --batch mode)
+    FILE		load the Lisp file FILE (implies --batch)
 
     --batch		batch mode: process options and exit
     --interp		interpreted mode: don't load compiled Lisp files
@@ -70,11 +69,9 @@ where OPTIONS are any of:
     --call FUNCTION	call the Lisp function FUNCTION
     --f FUNCTION
 
-    --load FILE		load the file of Lisp forms called FILE
+    --load FILE		load the Lisp file FILE
     -l FILE
 
-    -s FILE		 (implies --batch mode)
-
     --check		run self tests and exit
 
     --version		print version details
diff --git a/man/librep.texi b/man/librep.texi
index 2882359..15643c9 100644
--- a/man/librep.texi
+++ b/man/librep.texi
@@ -194,16 +194,16 @@ may be contacted at: @email{jsh@@users.sourceforge.net}.
 @cindex Invocation
 
 @menu
-* Command `rep'::
-* Implicitly Interpreting rep Scripts::  #!/usr/bin/rep
+* Rep execution::
+* Shebang invocation::  #!/usr/bin/rep
 * Interactive environment::
 @end menu
 
- node Command `rep', Implicitly Interpreting rep Scripts, , Invocation
- section Command `rep'
+ node Rep execution, Shebang invocation, , Invocation
+ section Rep execution
 
-The @code{rep} program may be used to launch the stand-alone
- code{librep} environment:
+Call @code{rep} program to launch a stand-alone @code{librep}
+environment:
 
 @example
 usage: rep [ var{rep-options}@dots{}] [ var{script} [ var{script-options}@dots{]}]
@@ -213,9 +213,6 @@ usage: rep [ var{rep-options}@dots{}] [ var{script} [ var{script-options}@dots{]
 Where @var{rep-options} may be any of the following:
 
 @table @samp
- item --init @var{file}
-Use @var{file} to boot the Lisp system from, instead of @file{init.jl}.
-
 @item --version
 Print the current version number and exit
 
@@ -234,56 +231,40 @@ Don't load the user's @file{~/.reprc} script, or the
 @item -f @var{function}
 Invoke the Lisp function @var{function} (with no arguments)
 
- item -l @var{script}
-Try to load the Lisp file @var{script}, this is equivalent to evaluating
-the form @samp{(load "@var{script}")}.
+ item -l @var{file}
+Try to load the Lisp file @var{file}, this is equivalent to evaluating
+the form @samp{(load "@var{file}")}.
 
 @item -q
 Terminate the Lisp process and exit.
 @end table
 
 @vindex command-line-args
-If @var{script} is given, it names the Lisp file to load, equivalent to
-the @samp{-l} option, except that @samp{--batch-mode} is implied. Any
- var{script-options} will be made available to the script (in the
- code{command-line-args} variable).
-
-After any arguments have been processed a banner message will be
-displayed before entering an interactive read-eval-print loop, unless
- samp{--batch-mode} was specified, in which case the interpreter exits.
+If @var{file} is given, it names the Lisp file to load, and
+ samp{--batch-mode} is implied. Any @var{script-options} will be made
+available to the script in the @code{command-line-args} variable.
 
-The read-eval-print loop simply reads complete Lisp forms (@pxref{The
-Lisp Reader}), evaluates them, before printing the result back to the
-console; this continues ad infinitum, or until you force an EOF (i.e.
-enter @kbd{C-d}).
+After any arguments have been processed, it enters the interactive
+environment, unless @samp{--batch-mode} was specified. See @pxref{Interactive environment}.
 
-
- node Implicitly Interpreting rep Scripts, Interactive environment, Command `rep', Invocation
- section Implicitly Interpreting rep Scripts
- cindex Implicitly Interpreting @code{rep} scripts
- cindex Executing @code{rep} scripts
+ node Shebang invocation, Interactive environment, Rep execution, Invocation
+ section Shebang invocation
+ cindex Shebang invocation
+ cindex Executing @code{rep} scripts implicitly
 @cindex Scripts, executing implicitly
 
-The @code{rep} interpreter also supports automatic invocation of
-scripts, using the oeprating system's support for @samp{#!} interpreter
-invocation (i.e. if the first line of an executable text file contains
- samp{#! @var{prog}}, the program @var{prog} is used to execute the
-script.
+The @code{rep} interpreter also supports ``Shebang'', or @samp{#!}
+interpreter invocation, i.e. if the first line of an executable text
+file contains @samp{#! var{prog}}, the program @var{prog} is used to
+execute the script, using the operating system's support.
 
-However there is a problem with this method, in that the @code{PATH}
-environment variable is not searched for the location of the
-interpreter, and thus the full file name of the interpreter program
-must be hard-coded into the script. To work around this problem
- code{rep} supports a slightly different method of invocation.
+However with this method, the @code{PATH} environment variable is not
+searched for the location of the interpreter, and thus the full file
+name of the @code{rep} interpreter program must be hard-coded into the
+script. 
 
-If the first two characters of a loaded Lisp file are @samp{#!}, then
-everything is treated as a comment until the first occurrence of the
-string @samp{!#}. This allows the first part of the script to be
-executed as a shell script invoking the @code{rep} interpreter.
-
-What this means, is that you want to put something like the following
-at the start of any scripts you want to execute implicitly (and
- kbd{chmod +x} the file as well):
+To work around this problem @code{rep} supports a slightly different
+method of invocation; first look at this example:
 
 @example
 #!/bin/sh
@@ -293,7 +274,12 @@ exec rep "$0" "$@@"
 ;; Lisp code follows dots{}
 @end example
 
- node Interactive environment, , Implicitly Interpreting rep Scripts, Invocation
+If the first two characters of a loaded Lisp file are @samp{#!}, then
+everything is treated as a comment until the first occurrence of the
+string @samp{!#}. This allows the first part of the script to be
+executed as a shell script invoking the @code{rep} interpreter.
+
+ node Interactive environment, , Shebang invocation, Invocation
 @include repl.texi
 
 @node The language, librep Internals, Invocation, Top
diff --git a/man/rep.1 b/man/rep.1
index 2bcd6ce..7525574 100644
--- a/man/rep.1
+++ b/man/rep.1
@@ -6,26 +6,22 @@
 .TH "REP" "1" "04 avril 2003" "" ""
 
 .SH NAME
-rep \- Read, Eval, Print Interpreter
+rep \- Librep Interpreter
 .SH SYNOPSIS
 
-\fBrep\fR [ \fB FILE \fR ] [ \fB \-\-batch \fR ] [ \fB \-\-interp \fR ] [ \fB \-f, \-\-call FUNCTION \fR ] [ \fB \-l, \-\-load FUNCTION \fR ] [ \fB \-s, \-\-scheme FILE \fR ] [ \fB \-\-version \fR ] [ \fB \-\-no-rc \fR ] [ \fB \-q, \-\-quit \fR ]
+\fBrep\fR [ \fB options \fR ][ \fB FILE \fR ]
 
 .SH "DESCRIPTION"
 .PP
-\fBrep\fR `librep' is a dialect of Lisp,
-designed to be used both as an extension language for applications and
-as a general purpose programming language. It was originally written
-to be mostly-compatible with Emacs Lisp, but has subsequently diverged
-markedly. Its aim is to combine the best features of Scheme and
-Common Lisp and provide an environment that is comfortable for
-implementing both small and large scale systems. It tries to be a
-"pragmatic" programming language.
+\fBrep\fR is the `librep' interpreter, a dialect of Lisp.
+.
+.P
+Unless the batch mode is specified, it enters the interactive mode.
+Read \fBInfo\fR for the details.
 .SH "OPTIONS"
 .TP
 \fBFILE\fR
-load the Lisp file \fIFILE\fR (from the cwd if possible, implies
-\fI\-\-batch\fR mode)
+load the Lisp file \fIFILE\fR (implies \-\-batch\fR)
 .TP
 \fB\-\-batch\fR
 Batch mode: process options and exit.
@@ -39,10 +35,6 @@ Call the Lisp function \fIFUNCTION\fR.
 \fB\-l \fIFILE\fB \-\-load \fIFILE\fB\fR
 Load the file of Lisp forms called \fIFILE\fR.
 .TP
-\fB\-s \fIFILE\fB \-\-scheme \fIFILE\fB\fR
-Load the file of Scheme forms called
-\fIFILE\fR (implies
-\fI\-\-batch\fR mode).
 .TP
 \fB\-\-version\fR
 Print version details.
diff --git a/man/repl.texi b/man/repl.texi
index a4c292a..305ce03 100644
--- a/man/repl.texi
+++ b/man/repl.texi
@@ -1,6 +1,6 @@
 @c The REPL -*-Texinfo-*-
 
- subsection Interactive enviroment
+ section Interactive enviroment
 @cindex The REPL
 @cindex Read-eval-print loop
 @cindex Interactive enviroment
@@ -9,6 +9,11 @@ When you invoke the stand-alone librep interpreter without giving it a
 script to execute the system is started in interactive mode. This
 means that the @dfn{REPL} is entered---the read-eval-print loop.
 
+The read-eval-print loop simply reads complete Lisp forms (@pxref{The
+Lisp Reader}), evaluates them, before printing the result back to the
+console; this continues ad infinitum, or until you force an EOF (i.e.
+enter @kbd{C-d}), or until you enter @code{,quit} command.
+
 The REPL works as its name suggests. It reads Lisp forms from the
 console, evaluates them, and then prints the result back to the
 console. Here is an example REPL session:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]