diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-12-07 16:30:06 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-12-07 16:30:06 -0800 |
commit | 01b5b93cdf4cfb0ba14178f22eb0b1143ef5704f (patch) | |
tree | 444ebb37fce80e76df1f2e663996b7fdb71d1de7 /debug.c | |
parent | 79781ded91b29fbdc406d460e466c5ffb06a1454 (diff) | |
download | txr-01b5b93cdf4cfb0ba14178f22eb0b1143ef5704f.tar.gz txr-01b5b93cdf4cfb0ba14178f22eb0b1143ef5704f.tar.bz2 txr-01b5b93cdf4cfb0ba14178f22eb0b1143ef5704f.zip |
* debug.c (debug): Fix regression: repeat last command by hitting
Enter stopped working. This was broken by recent bugfixes in the
string splitting functions, which introduced a semantics change.
* eval.c (flip_s, vecref_s): New symbol variables.
(op_modplace): New places (vecref ...) and (flip ...). Bugfix: dec
operator was incrementing.
(expand_place): Handle vecref and flip. Bugfix: pop has no
third argument and so is now handled by the same case as flip.
Bugfix: if a modify form has no third argument, then do not
resynthesize it with a nil third argument.
(eval_init): Initialize new symbol variables.
Register new flip operator. Register new list_vectory function
as intrinsic.
* lib.c (rplacd): When modifying the cdr field of a lazy cons,
then lapse the lazy function to nil! This is needed by user-defined
lazy conses, and it makes sense to do it this way rather than
put in some explicit interface.
(list_vector): New function.
* lib.h (list_vector): Declared.
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -34,7 +34,6 @@ val debug(val form, val bindings, val data, val line, val chr) val print_data = t; for (;;) { - uses_or2; val input, command; if (print_form) { @@ -58,7 +57,8 @@ val debug(val form, val bindings, val data, val line, val chr) flush_stream(std_output); input = split_str_set(get_line(std_input), lit("\t ")); - command = or2(first(input), last_command); + command = if3(equal(first(input), null_string), + last_command, first(input)); last_command = command; if (equal(command, lit("?")) || equal(command, lit("help"))) { |