diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-03-03 21:16:43 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-03-04 08:49:20 -0800 |
commit | f75994545cb88c6625e4122afa61fbbe1adeb081 (patch) | |
tree | c7206a6c009493b62313f34ae5f2deff58cc08cd | |
parent | 66bcec2c491445a76b3ef63c53ed982b896cef00 (diff) | |
download | txr-f75994545cb88c6625e4122afa61fbbe1adeb081.tar.gz txr-f75994545cb88c6625e4122afa61fbbe1adeb081.tar.bz2 txr-f75994545cb88c6625e4122afa61fbbe1adeb081.zip |
Version 60
* txr.c (version): Bumped.
* txr.1: Bumped version and set date.
* configure (txr_ver): Bumped.
* RELNOTES: Updated.
* txr.vim: Handle : symbol properly.
* eval.c (op_defun): Bugfix: documentation says that defun supports
the same parameter list as lambda, and that is the intent. But
this was broken, since op_defun was expecting the parameter list
to be a proper list containing only bindable symbols, ruling out
the use of the consing dot for rest parameter as well as the colon
keyword symbol for optional parmeters.
-rw-r--r-- | ChangeLog | 23 | ||||
-rw-r--r-- | RELNOTES | 31 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | eval.c | 18 | ||||
-rw-r--r-- | txr.1 | 4 | ||||
-rw-r--r-- | txr.c | 2 | ||||
-rw-r--r-- | txr.vim | 1 |
7 files changed, 75 insertions, 6 deletions
@@ -1,3 +1,26 @@ +2012-03-04 Kaz Kylheku <kaz@kylheku.com> + + Version 60 + + * txr.c (version): Bumped. + + * txr.1: Bumped version and set date. + + * configure (txr_ver): Bumped. + + * RELNOTES: Updated. + + * txr.vim: Handle : symbol properly. + +2012-03-04 Kaz Kylheku <kaz@kylheku.com> + + * eval.c (op_defun): Bugfix: documentation says that defun supports + the same parameter list as lambda, and that is the intent. But + this was broken, since op_defun was expecting the parameter list + to be a proper list containing only bindable symbols, ruling out + the use of the consing dot for rest parameter as well as the colon + keyword symbol for optional parmeters. + 2012-03-03 Kaz Kylheku <kaz@kylheku.com> * eval.c (eval_init): Expose remq, remql and remqual. @@ -1,3 +1,34 @@ + TXR 60 + 2011-03-04 + + + Features + + - List element removing functions: remq, remql, remqual. + + - Memory use optimizations in @(freeform) horizontal scanning. + + Bugs + + - Fixed incorrect processing within long lines, caused by + earlier optimizations in 57. + + - Missing 'd' command for deleting a breakpoint implemented + in the debugger. + + - numberp function no longer blows up on nil. + + - Fixed broken @(load) directive: was not allowing directives + which follow it to be processed. + + - Fixed incorrectly formatted line number information in + some exceptions. + + - Fixed missing support for optional and trailing parameters + in defun. + + + TXR 59 2011-02-29 @@ -357,7 +357,7 @@ fi # -txr_ver=59 +txr_ver=60 # # The all important banner. @@ -714,13 +714,27 @@ static val op_defun(val form, val env) val body = rest(rest(args)); val block = cons(block_s, cons(name, body)); val fun = cons(name, cons(params, cons(block, nil))); + val iter; + val colon = nil; if (!bindable(name)) eval_error(form, lit("defun: ~s is not a bindable sybol"), name, nao); - if (!all_satisfy(params, func_n1(bindable), nil)) - eval_error(form, lit("defun: arguments must be bindable symbols"), nao); + for (iter = params; consp(iter); iter = cdr(iter)) { + val param = car(iter); + if (param == colon_k) { + if (colon) + eval_error(form, lit("defun: multiple colons in parameter list"), nao); + else + colon = t; + continue; + } + if (!bindable(param)) + eval_error(form, lit("defun: parameter ~s is not a bindable symbol"), param, nao); + } + if (iter && !bindable(iter)) + eval_error(form, lit("defun: dot parameter ~s is not a bindable symbol"), iter, nao); /* defun captures lexical environment, so env is passed */ sethash(top_fb, name, cons(name, func_interp(env, fun))); @@ -21,9 +21,9 @@ .\"IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED .\"WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -.TH "TXR" 1 2012-02-29 "Utility Commands" "Txr Text Processing Language" "Kaz Kylheku" +.TH "TXR" 1 2012-03-03 "Utility Commands" "Txr Text Processing Language" "Kaz Kylheku" .SH NAME -txr \- text processing language (version 59) +txr \- text processing language (version 60) .SH SYNOPSIS .B txr [ options ] query-file { data-file }* .sp @@ -43,7 +43,7 @@ #include "debug.h" #include "txr.h" -const wchli_t *version = wli("59"); +const wchli_t *version = wli("60"); const wchar_t *progname = L"txr"; const wchar_t *spec_file = L"stdin"; @@ -107,6 +107,7 @@ syn match txr_ncomment ";.*" contained syn match txr_ident "[:@]\?[A-Za-z0-9!$%&*+\-<=>?\\^_~]\+" contained syn match txl_ident "[:@]\?[A-Za-z0-9!$%&*+\-<=>?\\^_~/]\+" contained +syn match txl_ident ":" contained syn match txr_num "[+-]\?[0-9]\+" contained syn match txr_unquote "," contained |