summaryrefslogtreecommitdiffstats
path: root/txr.vim
Commit message (Collapse)AuthorAgeFilesLines
* Version 107.txr-107Kaz Kylheku2015-04-261-83/+83
|
* Adding lcons macro.Kaz Kylheku2015-04-181-108/+109
| | | | | | | | | * eval.c (me_lcons): New function. (eval_init): Registered lcons macro. * txr.1: Documented lcons. * tl.vim, txr.vim: Regenerated.
* Adding getenv, setenv and unsetenv.Kaz Kylheku2015-04-181-128/+128
| | | | | | | | | | | | | | * lib.c (setenv, unsetenv): Changed static functions to external. Moved them out of the #if !HAVE_TIMEGM block. * lib.h (setenv, unsetenv): Declared. * sysif.c (getenv_wrap, setenv_wrap, unsetenv_wrap): New functions. (sysif_init): Registered getenv, setenv and unsetenv. * txr.1: Documented getenv, setenv and unsetenv. * tl.vim, txr.vim: Regenerated.
* Adding exit* function which calls _exit.Kaz Kylheku2015-04-161-140/+141
| | | | | | | | | * sysif.c (exit_star_wrap): New static function. (sysif_init): Registered exit* intrinsic. * txr.1: Documented exit*. * tl.vim, txr.vim: Regenerated.
* Add exec and pipe functions.Kaz Kylheku2015-04-161-141/+141
| | | | | | | | | | | * configure: Check for pipe. * sysif.c (exec_wrap, pipe_wrap): New static functions. (sysif_init): Register exec and pipe intrinsics. * txr.1: Documented exec and pipe. * tl.vim, txr.vim: Regenerated.
* Adding chmod.Kaz Kylheku2015-04-161-160/+161
| | | | | | | | | | | * configure: Detect chmod. * sysif.c (chmod_wrap): New function. (sysif_init): Register chmod intrinsic. * txr.1: Documented. * tl.vim, txr.vim: Regenerated.
* Implementing while* and until* loops.Kaz Kylheku2015-04-111-10/+10
| | | | | | | | | | | * eval.c (while_star_s, until_star_s): New symbol variables. (me_while_star, me_until_star): New static functions. (eval_init): Initialize new variables. Register while* and until* macros. * txr.1: Documented while* and until*. * txr.vim, tl.vim: Regenerated.
* Exposing dup and dup2.Kaz Kylheku2015-04-111-144/+145
| | | | | | | | | | * sysif.c (dup_wrap): New static function. (sysif_init): Register dup_wrap as dupfd. The name dup conflicts with an existing function. * txr.1: Documented dupfd. * txr.vim, tl.vim: Regenerated.
* Fork and wait support.Kaz Kylheku2015-04-091-129/+132
| | | | | | | | | | | | | | * sysif.c (work_wrap, wait_wrap, wifexited, wexitstatus, wifsignaled, wtermsig, wcoredump, wifstopped, wstopsig, wifcontinued): New static functions. (sysif_init): Register new intrinsics: functions fork, wait, w-ifexited, w-exitstatus, w-ifsignaled, w-termsig, w-coredump, w-ifstopped, w-stopsig, w-ifcontinued; and variables w-nohang, w-untraced, w-continued. * txr.1: Documented. * tl.vim, txr.vim: Regenerated.
* * eval.c (iflet_s, when_s): New global variables.Kaz Kylheku2015-04-061-111/+112
| | | | | | | | | | | (me_iflet_whenlet): New static function. (eval_init): Initialize when_s, iflet_s. Use when_s for registering me_when. Register me_iflet_whenlet. * txr.1: Documented iflet and whenlet. * tl.vim, txr.vim: Regenerated.
* New whilet macro.Kaz Kylheku2015-04-051-13/+13
| | | | | | | | | | | * eval.c (while_s): New symbol variable. (me_whilet): New static function. (eval_init): Initialize while_s. Use while_s in registration of while macro. Register new whilet macro. * txr.1: whilet is documented. * tl.vim, txr.vim: Regenerated.
* Version 105.txr-105Kaz Kylheku2015-03-141-138/+139
|
* New ignerr macro.Kaz Kylheku2015-02-251-109/+111
| | | | | | | | | * eval.c (me_ignerr): New static function. (eval_init): Registered ignerr macro. * txr.1: Documented. * tl.vim, txr.vim: Regenerated.
* * arith.c (trunc_rem): New function.Kaz Kylheku2015-02-071-10/+10
| | | | | | | | | | * eval.c (eval_init): Register trunc-rem intrinsic. * lib.h (trunc_rem): Declared. * txr.1: Documented trunc-rem. * tl.vim, txr.vim: Updated.
* * sysif.c (abort_wrap): New static function.Kaz Kylheku2015-02-061-163/+164
| | | | | | | | | | (sysif_init): Registered abort intrinsic. * txr.1: Documented abort. Changed Unix Programming heading to System Programming, since exit, abort and errno are not Unix-specific, but C-specific. * tl.vim, txr.vim: Updated.
* * unwind.c (unhandled_hook_s): New static variable.Kaz Kylheku2015-02-061-165/+165
| | | | | | | | | | | | | | | | | | | (uw_throw): In the unhandled case, check if *unhandled-hook* variable has a function, and use it instead of the default logic. If it's not a function, abort with an error message. Clear it so that if the hook function re-enters this code, it will not be used. Always exit now on unhandled exceptions; do not abort. (uw_late_init): New function. * unwind.h (uw_late_init): Declared. * lib.c (init): Call uw_late_init. * txr.1: Documented *unhandled-hook*. * genvim.txr: Scan the unwind.c file, since it has a reg_var now. * tl.vim, txr.vim: Updated.
* * arith.c (make_ubignum): New static function.Kaz Kylheku2015-01-291-129/+130
| | | | | | | | | | | | (sign_extend): New function. * eval.c (eval_init): Register sign-extend intrinsic. * lib.h (sign_extend): Declared. * txr.1: Documented sign-extend. * tl.vim, txr.vim: Updated.
* Basic implementation of constantp. Does notKaz Kylheku2015-01-211-142/+142
| | | | | | | | | | | recognize forms like (+ 2 2) as constant. * eval.c (constantp_noex, constantp): New functions. (eval_init): Registered constantp as intrinsic. * tl.vim, txr.vim: Updated. * txr.1: Documented constantp.
* Allow macros to tell what symbols have lexical functionKaz Kylheku2015-01-211-96/+97
| | | | | | | | | | | or variable bindings. * eval.c (lexical_var_p, lexical_fun_p): New local functions. (eval_init): Registered as intrinsics. * txr.1: Documented lexical-var-p and lexical-fun-p. * tl.vim, txr.vim: Updated.
* Version 102.txr-102Kaz Kylheku2015-01-131-113/+117
|
* * stream.c (stream_init): Register make_catenated_stream inKaz Kylheku2014-12-251-147/+147
| | | | | | | | a different form as cat-streams. * txr.1: Document cat-streams. * tl.vim, txr.vim: Regenerated.
* * eval.c (ap_s, ret_s, aret_s): New symbol variables.Kaz Kylheku2014-12-231-152/+152
| | | | | | | | | | | | (me_ret): Static function renamed to me_ret_aret. Handles ret and aret macro expansion. (eval_init): Initialize ap_s, ret_s and aret_s. Re-register ret macro using ret_s and bind to me_ret_aret. Register aret macro. * txr.1: Documented aret. * tl.vim, txr.vim: Regenerated.
* * eval.c (eval_init): Registered intrinsic function unique.Kaz Kylheku2014-12-231-7/+7
| | | | | | | | | | | * lib.c (unique): New function. (uniq): Becomes wrapper around unique. * lib.h (unique): Declared. * txr.1: Documented unique, and equivalence between uniq and unique. * tl.vim, txr.vim: Regenerated.
* Syntax highlighting issue: keywords in braced variable syntaxKaz Kylheku2014-12-181-1/+2
| | | | | | | | | | not being recognized. * genvim.txr (txr_braced_ident): New match kind, specifically for a keyword. (txr_bracevar): Bracevar region contains txr_braced_indent. * txr.vim, tl.vim: Regenerated.
* * eval.c (eval_init): Register in function as intrinsic.Kaz Kylheku2014-12-051-106/+107
| | | | | | | | | | * lib.c (in): New function. * lib.h (in): Declared. * txr.1: Documented in. * txr.vim, tl.vim: Regenerated.
* * eval.c (eval_init): Register lequal and gequal.Kaz Kylheku2014-11-271-111/+113
| | | | | | | | | | * lib.c (lequal, gequal, lequalv, gequalv): New functions. * lib.h (lequal, gequal, lequalv, gequalv): Declared. * txr.1: Documented lequal and gequal. * txr.vim, tl.vim: Regenerated.
* * eval.c (opip_s, oand_s, chain_s, chand_s): New global variables.Kaz Kylheku2014-11-101-92/+94
| | | | | | | | | | | | (macro_form_p): Forward declaration added. (me_opip): New static function. (eval_init): Intern new symbols, register opip and oand macros to me_opip function. Use chain_s and chand_s in registration for chain and chand. * txr.1: Document opip and oand * tl.vim, txr.vim: Regenerated.
* Vim syntax coloring for standalone TXR Lisp (*.tl) files.Kaz Kylheku2014-10-291-21/+21
| | | | | | | | | * genvim.txr (generate): New pattern function, contains generation logic so we can do it twice. * txr.vim: Regenerated. * tl.vim: New file.
* * eval.c (eval_init): Register notf intrinsic function.Kaz Kylheku2014-10-211-70/+70
| | | | | | | | | | | | | | * lib.c (do_not): New static function. (notf): New function. * lib.h (notf): Declared. * txr.1: Documented notf. * share/txr/stdlib/txr-case.txr (bindable): Eliminated. (txr-if): Use functional expression, taking advantage of notf. * txr.vim: Regenerated.
* * share/txr/stdlib/txr-case.txr: New file.Kaz Kylheku2014-10-211-7/+8
| | | | | | | | | | | | * txr.1: Document txr-if, txr-when and txr-case. * genvim.txr: Added new macro names. * tests/011/txr-case.expected: New file. * tests/011/txr-case.txr: New file. * txr.vim: Regenerated.
* Source file inclusion implemented: needed for macros.Kaz Kylheku2014-10-201-6/+6
| | | | | | | | | | | | | | | | | | | | | * match.c (include_s): New symbol variable. (v_load): Function extended to handle include semantics. (include): External wrapper function for doing inclusion via v_load. (syms_init): include_s initialized. * match.h (include_s): Declared. (include): Declared. * parser.y (check_for_include): New static function. (clauses_rev): Use check_for_include to replace @(include ..) directive. * txr.1: Documented include. * genvim.txr: Added include symbol. * txr.vim: Regenerated.
* * arith.c (gcd): Fix semantics. If either operand isKaz Kylheku2014-10-161-95/+95
| | | | | | | | | | | | | | | | zero, return the other operand. (lcm): New function. * eval.c (eval_init): Retarget registration of gcd to variable argument gcdv function. Register lcm. * lib.c (gcdv, lcmv): New functions. * lib.h (gcdv, lcm, lcmv): Declared. * txr.1: Re-document gcd with coverage of lcm. * txr.vim: Regenerated.
* New @(line) and @(chr) directives.Kaz Kylheku2014-10-161-12/+12
| | | | | | | | | | | | | * match.c (line_s): New variable. (h_chr, v_line): New static functions. (syms_init): line_s initialized. (dir_tables_init): Register v_line and h_chr. * match.h (line_s): Declared. * txr.1: Document @(line) and @(chr) directives. * txr.vim: Regenerated.
* * eval.c (eval_init): Register greater function as intrinsic.Kaz Kylheku2014-10-131-109/+109
| | | | | | | | | | | | | | | | | | | | * lib.c (gt_f, lt_f): Global variables removed. (greater_f): New variable. (greater): New function. (find_max, pos_max): Use greater_f as default for testfun, rather than gt_f. (find_min, pos_min): Use less_f as default for testfun, rather than lt_f. (obj_init): Remove references to gt_f and lt_f. GC-protect and initialize greater_f. * lib.h (greater_f): Declared. (gt_f, lt_f): Declarations removed. * txr.1: Documented greater, and use of less and greater in pos-min, pos-max, find-min and find-max. * txr.vim: Regenerated.
* * eval.c (merge_wrap): New static functionKaz Kylheku2014-10-121-91/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | (eval_init): Register less as intrinsic. Retarget merge intrinsic to merge_wrap for proper argument defaulting which is missing from merge, and which we don't want to introduce there since internal calls to merge don't erquire it. Change registration of sort so it has only one required argument, not two. * lib.c (less_f): New global variable. (less_tab): New static array. (less_tab_init): New static function. (less): New function. (sort): Default lessfun argument to the less function. (obj_init): GC-protect the less_f variable. Initialize it with a function object made from the less function. (init): Call less_tab_init. * lib.h (enum type): New enumeration member MAX_TYPE, an alias for the largest type. (less_f, less): Declared. * txr.1: Documented new less function, and that the lessfun argument in sort and merge is optional, defaulting to less. * txr.vim: Regenerated.
* * eval.c (eval_init): Register chr_isblank and chr_isunisp asKaz Kylheku2014-10-111-138/+138
| | | | | | | | | | | | | | | | intrinsics. * lib.c (chr_isblank, chr_isunisp): New functions. * lib.h (chr_isblank, chr_isunisp): Declared. * regex.h (spaces): Declaration for existing variable added. * txr.1: Documented chr-isblank and chr-isunisp. * genvim.txr: Add missing sysif.c. * txr.vim: Regenerated.
* Version 98.txr-98Kaz Kylheku2014-09-261-63/+64
|
* * arith.c (arith_init): Register some variables: *flo-dig*,Kaz Kylheku2014-09-011-155/+156
| | | | | | | | | | | | *flo-min*, *flo-max*, *flo-epsilon*, *pi* and *e*. * genvim.txr: Include arith.c in scan for symbols. * lib.c (init): arith_init() must now be called after eval_init(). * txr.1: Documented new variables.. * txr.vim: Updated.
* Version 96.txr-96Kaz Kylheku2014-08-141-8/+9
|
* Version 94.txr-94Kaz Kylheku2014-08-051-74/+76
|
* * parser.l: Allow unquotes and splices in QSPECIAL and BRACED states.Kaz Kylheku2014-07-301-3/+7
| | | | | | | | | * parser.y (quasi_item): Support splices as items. * genvim.txr: Syntax highlighting support for unquotes in quasiliterals. * txr.vim: Updated.
* * txr.vim: Updated.Kaz Kylheku2014-07-301-100/+101
|
* * RELNOTES: Updated.Kaz Kylheku2014-07-221-41/+42
| | | | | | | | * configure, txr.1: Bumped version. * share/txr/stdlib/ver.txr: Likewise * arith.c (log2): Change to static.
* * genvim.txr: Fixed highlighting issues in numbers followed by newline.Kaz Kylheku2014-07-201-91/+92
| | | | * txr.vim: Regenerated.
* Fix old, known syntax highlighting problems between symbols,Kaz Kylheku2014-07-151-8/+10
| | | | | | | | | | | | | | | integers and floating literals. * genvin.txr (txr_num): The general solution is to over-match a number by one character: a non-token constituent, and then subtract that from the highlight region using me=e-1. This solves the prefix ambiguities between numbers and symbols. (txr_badnum): New match: matches floating literals with trailing junk, which are highlighted as errors. (txr_directive, txr_list, txr_bracket, txr_mlist, txr_mbracket): All of these contain a txr_badnum. * txr.vim: Regenerated.
* Fix broken regex highlighting.Kaz Kylheku2014-07-151-96/+98
| | | | | | | * genvim.txr (txl_regex): Missing syntactic region added. (txr_regex): Start pattern is just a slash; no optional # in front. * txr.vim: Regenerated.
* * tests/011/macros-2.txr: Added test for labels shadowing macro,Kaz Kylheku2014-07-101-136/+137
| | | | | | | | and let shadowing symacro. * tests/011/macros-2.expected: Regenerated * txr.vim: Regenerated.
* Version 91.txr-91Kaz Kylheku2014-07-021-118/+122
|
* * eval.c (eval_init): Register member and member_if as intrinsics.Kaz Kylheku2014-06-181-136/+140
| | | | | | | | | | * lib.c (member, member_if): New functions. * lib.h (member, member_if): Declared. * txr.1: Documented. * txr.vim: Regenerated.
* Version 90txr-90Kaz Kylheku2014-06-111-103/+105
|