From fca75faa1a6c3737b038d5fee6ce714a1f554280 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 12 May 2022 07:54:52 -0700 Subject: New options: --in-package and --compile. * txr.c (help): Mention new options. (do_compile_opt, do_in_package_opt): New static functions. (txr_main): Implement options. * Makefile (COMPILE_TL): Use the options instead of -e. * txr.1: Document. --- txr.1 | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index a5ff6378..3479faee 100644 --- a/txr.1 +++ b/txr.1 @@ -818,7 +818,10 @@ option is processed. If the evaluation of every .meta expression evaluated this way terminates normally, and there is no .meta script-file -argument, then \*(TX terminates with a successful status. +argument, then \*(TX terminates with a successful status, +instead of entering the interactive listener. The +.code -i +option can be used to request the listener. .meIP -p < expression Just like @@ -1052,6 +1055,46 @@ complement operators are handled using the derivative back-end. This option makes it possible to test that back-end on test cases that it wouldn't normally receive. +.meIP >> --in-package= name +This option changes to the specified package, by finding the package of the +specified +.meta name +and assigning that to the +.code *package* +special variable. If the package is not found, a diagnostic is issued, +and \*(TX terminates unsuccessfully. +The package thus specified is visible to the subsequent occurrences of the +.code -e +family of options as well as of the +.code --compile +option. It does not affect the value of +.code *package* +which is in effect when a +.meta script-file +is executed or when the interactive listener is entered. + +.meIP <2> --compile= source-file [: target-file ] +This option invokes the +.code compile-update-file +on +.metn source-file . +If +.meta target-file +is specified, it is passed to +.code compile-update-file +as the target argument; otherwise, that argument is defaulted. +The option can be used multiple times to process multiple +files. Unsuccessful compilation throws an exception, causing +\*(TX to terminate abnormally. Similarly to the +.code -e +option, if this option is used at least once, +and all of the invocations are successful, and there is no +.meta script-file +argument, then \*(TX terminates with a successful status instead +of entering the interactive listener. The +.code -i +option can be used request the listener. + .coIP -- Signifies the end of the option list. -- cgit v1.2.3