summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-06-13 07:37:26 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-06-13 07:37:26 -0700
commit7dcbe6987807654578b6c8ddb740dd246ad66229 (patch)
treeb40de159deaf92233e8b91c6ff7ff1d8008fae7d
parentf57d6a2b3c292a94b61b07b0087e95fa2f8ea6bd (diff)
downloadtxr-7dcbe6987807654578b6c8ddb740dd246ad66229.tar.gz
txr-7dcbe6987807654578b6c8ddb740dd246ad66229.tar.bz2
txr-7dcbe6987807654578b6c8ddb740dd246ad66229.zip
New --lisp option: treat unsuffixed files as Lisp.
* txr.c (help): Added help text. (txr_main): Handle lisp option.
-rw-r--r--ChangeLog7
-rw-r--r--txr.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c77bec71..35f28093 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2015-06-13 Kaz Kylheku <kaz@kylheku.com>
+ New --lisp option: treat unsuffixed files as Lisp.
+
+ * txr.c (help): Added help text.
+ (txr_main): Handle lisp option.
+
+2015-06-13 Kaz Kylheku <kaz@kylheku.com>
+
* txr.c (txr_main): Handle Lisp files.
2015-06-13 Kaz Kylheku <kaz@kylheku.com>
diff --git a/txr.c b/txr.c
index ba4e86a2..effb3c2b 100644
--- a/txr.c
+++ b/txr.c
@@ -136,6 +136,7 @@ static void help(void)
"--license Display software license\n"
" Use of txr implies agreement with the disclaimer\n"
" section at the bottom of the license.\n"
+"--lisp Treat unsuffixed query files as TXR Lisp.\n"
"--lisp-bindings Synonym for -l\n"
"--debugger Synonym for -d\n"
"--noninteractive Synonym for -n\n"
@@ -485,6 +486,9 @@ int txr_main(int argc, char **argv)
opt_lisp_bindings = 1;
opt_print_bindings = 1;
continue;
+ } else if (equal(opt, lit("lisp"))) {
+ txr_lisp_p = t;
+ continue;
} else if (equal(arg, lit("debugger"))) {
#if CONFIG_DEBUG_SUPPORT
opt_debugger = 1;