From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.user Subject: Making the -e option compatible with new versions of Guile 1.4 Date: Fri, 14 Jan 2005 17:33:21 +0100 Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1105721506 8612 80.91.229.6 (14 Jan 2005 16:51:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Jan 2005 16:51:46 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Jan 14 17:51:25 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CpUfT-0008Mm-00 for ; Fri, 14 Jan 2005 17:51:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CpUln-0007Ba-3V for guile-user@m.gmane.org; Fri, 14 Jan 2005 11:57:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CpUlW-00078E-Gr for guile-user@gnu.org; Fri, 14 Jan 2005 11:57:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CpUlN-000727-5t for guile-user@gnu.org; Fri, 14 Jan 2005 11:57:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CpUlF-0006w4-VB for guile-user@gnu.org; Fri, 14 Jan 2005 11:57:21 -0500 Original-Received: from [129.217.163.1] (helo=mail.dt.e-technik.uni-dortmund.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CpUO3-0006QB-Qi for guile-user@gnu.org; Fri, 14 Jan 2005 11:33:24 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.dt.e-technik.uni-dortmund.de (Postfix) with ESMTP id 196574EF3C for ; Fri, 14 Jan 2005 17:33:22 +0100 (CET) Original-Received: from mail.dt.e-technik.uni-dortmund.de ([127.0.0.1]) by localhost (krusty [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32290-01-6 for ; Fri, 14 Jan 2005 17:33:21 +0100 (CET) Original-Received: from troy.dt.e-technik.uni-dortmund.de (troy.dt.e-technik.uni-dortmund.de [129.217.163.17]) by mail.dt.e-technik.uni-dortmund.de (Postfix) with ESMTP id 76A7B4EE45 for ; Fri, 14 Jan 2005 17:33:21 +0100 (CET) Original-Received: by troy.dt.e-technik.uni-dortmund.de (Postfix, from userid 520) id 3186EB96B; Fri, 14 Jan 2005 17:33:21 +0100 (CET) Original-To: guile-user@gnu.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) X-Virus-Scanned: by amavisd-new at dt.e-technik.uni-dortmund.de X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:4073 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:4073 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::. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user