guile-user
[Top][All Lists]
Advanced

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

Making the -e option compatible with new versions of Guile 1.4


From: Marius Vollmer
Subject: Making the -e option compatible with new versions of Guile 1.4
Date: Fri, 14 Jan 2005 17:33:21 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Hi,

For 1.7, I have made Guile's interpretation of the -e option
compatible with the behavior of ttn's Guile 1.4 series.  When this
works out, I want to also install this in the 1.6 series.

What do you all think?

Here is the new documentation of -e:

`-e FUNCTION'
     Make FUNCTION the "entry point" of the script.  After loading the
     script file (with `-s') or evaluating the expression (with `-c'),
     apply FUNCTION to a list containing the program name and the
     command-line arguments -- the list provided by the `command-line'
     function.

     A `-e' switch can appear anywhere in the argument list, but Guile
     always invokes the FUNCTION as the _last_ action it performs.
     This is weird, but because of the way script invocation works under
     POSIX, the `-s' option must always come last in the list.

     The FUNCTION is most often a simple symbol that names a function
     that is defined in the script.  It can also be of the form `(@
     MODULE-NAME SYMBOL)' and in that case, the symbol is looked up in
     the module named MODULE-NAME.

     For compatibility with some versions of Guile 1.4, you can also
     use the form `(symbol ...)' (that is, a list of only symbols),
     which is equivalent to `(@ (symbol ...) main)', or `(symbol ...)
     symbol' (that is, a list of only symbols followed by a symbol),
     which is equivalent to `(@ (symbol ...) symbol)'.  We recommend to
     use the equivalent forms directly since they corresponf to the `(@
     ...)' read syntax that can be used in normal code, *Note Using
     Guile Modules::.

     *Note Scripting Examples::.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]