summaryrefslogtreecommitdiffstats
path: root/txr.1
Commit message (Collapse)AuthorAgeFilesLines
* Version 167.txr-167Kaz Kylheku2017-02-021-2/+2
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* awk: support list of string as input source.Kaz Kylheku2017-01-291-3/+13
| | | | | | | | * share/txr/stdlib/awk.tl (sys:awk-state loop): Allow an input source to be a list of strings, which is converted to a stream. * txr.1: Documented.
* doc: new package example showing function override.Kaz Kylheku2017-01-291-0/+39
| | | | | | | * txr.1: Example showing + symbol being replaced in a custom package with a local symbol, and a function being bound which overloads + to allow strings and numbers.
* Expose defer-warning and dump-deferred-warnings.Kaz Kylheku2017-01-261-0/+53
| | | | | | | * unwind.c (uw_late_init): Register defer-warning and dump-deferred-warnings intrinsics. * txr.1: Documented.
* Version 166.txr-166Kaz Kylheku2017-01-261-2/+2
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* awk macro: provide name of current input via fname.Kaz Kylheku2017-01-261-0/+24
| | | | | | | | | | * share/txr/stdlib/awk.tl (sys:awk-state): New slot, file-name. (sys:awk-state loop): Set file-name from current input name, or else from the stream name property if the current input is a stream object. (sys:awk-mac-let): New awk macro, fname. * txr.1: Documented fname.
* awk macro: bind *stdin* to current input stream.Kaz Kylheku2017-01-261-0/+11
| | | | | | | | * share/txr/stdlib/awk.tl (sys:awk-state loop): Instead of using the lexical variable stin, use *stdin*, so that the standard input stream is re-bound. * txr.1: Documented binding and scope of *stdin*.
* doc: update compat notes: new 165 value.Kaz Kylheku2017-01-251-0/+16
| | | | | * txr.1: Describe the Lisp expansion neglect in the pattern language that is fixed for 166, reversible with -C.
* Local macrolets in build become functions.Kaz Kylheku2017-01-251-1/+6
| | | | | | | | | | * share/txr/stdlib/build.tl (sys:list-builder-macrolets): Function renamed to sys:list-builder-flets. Builds local functions instead of macrolets. (build): Follow rename of sys:list-builder-macrolets. * txr.1: Documentation updated and example added of use of add as a higher order function.
* New handle* macro, analogous to catch*.Kaz Kylheku2017-01-251-1/+15
| | | | | | | | | | | * share/txr/stdlib/except.tl (sys:expand-handle): New function. (handle): Use sys:expand-handle to expand arguments. The previously unused :whole form argument is now put to use, and correctly captured using :form rather than :whole. (handle*): New macro. * txr.1: Documented.
* New catch*, giving access to exception symbol.Kaz Kylheku2017-01-251-1/+15
| | | | | | | | | | | | | | | | | | * eval.c (op_catch): The sys:catch operator now passes the exception symbol as the first argument of each clause. This means the catch macro must be adjusted. * share/txr/stdlib/except.tl (catch): Macro now inserts a gensym dummy first argument into each clause to take the symbol passed by the sys:catch operator. (catch*): New macro, which is identical to the previous catch macro, and thus exposes the symbol passed as the first argument. * txr.1: Documented catch*. * tests/012/struct.tl: Some gensym numbers need adjusting in one test case.
* Expose plist to alist functions.Kaz Kylheku2017-01-241-1/+67
| | | | | | | | * eval.c (eval_init): Register plist-to-alist and improper-plist-to-alist intrinsics. * txr.1: Documented improper plist concept and new functions.
* New memp function for searching a plist.Kaz Kylheku2017-01-241-5/+43
| | | | | | | | | | * eval.c (eval_init): Register memp intrinsic. * lib.c (memp): New function. * lib.h (memp): Declared. * txr.1: Documented.
* Support keyword params via :key param list macro.Kaz Kylheku2017-01-231-0/+155
| | | | | | | | | | | | | | | | | | * eval.c (expand_param_macro): Use lisplib_try_load to retry failed parameter macro lookup, thereby supporting auto-loading of modules that define parameter macros. * lisplib.c (keyparams_set_entries, keyparams_instantiate): New static functions. (lisplib_init): Support autoloading of keyparams.tl via new functions. * share/txr/stdlib/keyparams.tl: New file. * txr.1: Documented :key param list macro. * checkman.txr: Support "Parameter list macro" documentation section type.
* Bump copyright year to 2017.Kaz Kylheku2017-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * LICENSE, LICENSE-CYG, METALICENSE, Makefile, args.c, args.h, arith.c, arith.h, cadr.c, cadr.h, combi.c, combi.h, configure, debug.c, debug.h, eval.c, eval.h, filter.c, filter.h, ftw.c, ftw.h, gc.c, gc.h, glob.c, glob.h, hash.c, hash.h, jmp.S, lib.c, lib.h, lisplib.c, lisplib.h, match.c, match.h, parser.c, parser.h, parser.l, parser.y, rand.c, rand.h, regex.c, regex.h, signal.c, signal.h, stream.c, stream.h, struct.c, struct.h, sysif.c, sysif.h, syslog.c, syslog.h, termios.c, termios.h, txr.1, txr.c, txr.h, unwind.c, unwind.h, utf8.c, utf8.h, share/txr/stdlib/awk.tl, share/txr/stdlib/build.tl, share/txr/stdlib/cadr.tl, share/txr/stdlib/conv.tl, share/txr/stdlib/except.tl, share/txr/stdlib/getopts.tl, share/txr/stdlib/getput.tl, share/txr/stdlib/hash.tl, share/txr/stdlib/ifa.tl, share/txr/stdlib/package.tl, share/txr/stdlib/path-test.tl, share/txr/stdlib/place.tl, share/txr/stdlib/socket.tl, share/txr/stdlib/struct.tl, share/txr/stdlib/tagbody.tl, share/txr/stdlib/termios.tl, share/txr/stdlib/txr-case.tl, share/txr/stdlib/type.tl, share/txr/stdlib/with-resources.tl, share/txr/stdlib/with-stream.tl, share/txr/stdlib/yield.tl: Add 2017 to all copyright headers and strings.
* doc: grammar under kfs variable.Kaz Kylheku2017-01-211-1/+1
| | | | * txr.1: "when they empty" -> "when they are empty".
* doc: missing :var documented.Kaz Kylheku2017-01-211-0/+25
| | | | | txr.1: the @(next) directive has a :var argument which was added in 2011 but never documented.
* Document new diagnostic functions.Kaz Kylheku2017-01-161-0/+235
| | | | | | | | * txr.1: New section Static Error Diagnosis describing error handling and warnings. Documented functions tentative-def-exists, register-tentative-def, purge-deferred-warning, compile-defr-warning, compile-error and compile-warning
* doc: bad cblk and synb.Kaz Kylheku2017-01-121-9/+8
| | | | | * txr.1: Fix numerous instances of bad .cble/.cblk usage and replace one .synb/.syne with .cblk/.cble.
* doc: spurious blank line.Kaz Kylheku2017-01-121-1/+0
|
* doc: use markup in struct syntax.Kaz Kylheku2017-01-121-6/+6
| | | | | * txr.1: Use .mets in syntax block for frame, catch-frame anf handle-frame, as well as time.
* doc: bad headings.Kaz Kylheku2017-01-121-2/+2
| | | | | * txr.1: Fixed spurious comma in Methods car ... heading and no and @ in Accessors caar ...
* doc: blank line after .desc.Kaz Kylheku2017-01-121-1/+0
| | | | * txr.1: Fixed under symbol-value.
* doc: bad .IKaz Kylheku2017-01-121-1/+1
| | | | * txr.1: .I with run-on comma after quote becomes .IR.
* doc: shorten param macro memoization example.Kaz Kylheku2017-01-121-6/+1
| | | | * txr.1: Replace silly loop with idiomatic code.
* doc: formatting issue in param macros example.Kaz Kylheku2017-01-121-1/+1
| | | | * txr.1: Fix .cble that should be .cblk.
* Version 165.txr-165Kaz Kylheku2017-01-101-2/+2
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* Allow last var to be omitted in whilet.Kaz Kylheku2017-01-061-0/+17
| | | | | | | * eval.c (me_whilet): insert gensym if last var is missing. Warn if init-form looks like a variable. * txr.1: Documented by copy and paste from iflet.
* New Lisp feature: param list expander.Kaz Kylheku2017-01-041-0/+211
| | | | | | | | | | | | | | | | | | | | | * eval.c (pm_table): New static variable. (expand_param_macro): New static function. (expand_params): Expand parameter list macros via expand_param_macro. (eval_init): gc-protect pm_table and initialize it. Register *param-macro* variable. * lisplib.v (pmac_set_entries, pmac_instantiate): New static functions. (lisplib_init): Register autoloading of pmac.tl via new functions. * share/txr/stdlib/pmac.tl: New file. * txr.1: Notes under defun, lambds, flet/labels and defmacro about the existence of parameter macros which add to the syntax. New Parameter List Macros section. Documented *param-macro* and define-param-expander.
* Version 164.txr-164Kaz Kylheku2017-01-011-2/+2
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* Bugfix: repeated expansion of catch unstable.Kaz Kylheku2016-12-311-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out we have a silly problem: catch is a special operator, which undergoes a macro-like expansion which alters its syntax, but uses the same operator symbol. We turn catch into a macro which expands to a sys:catch operator. * eval.c (sys_catch_s): New symbol variable. (expand_catch): Function now expands sys:catch forms without altering any syntax. (do_expand): Check for sys:catch rather than catch. Call expand_catch differently: it takes the form now instead of just the arguments, so it can return the original form if no expansion takes place. (eval_init): Initialize sys_catch_s variable. Change registration of op_catch to sys:catch symbol. * lisplib.c (except_set_entries): Add catch to the list of autoload symbols for except.tl. * share/txr/stdlib/except.tl (catch): New macro for transforming catch to sys:catch. * txr.1: Reclassify catch operator as a macro.
* New awk variable fw for fixed-width delimiting.Kaz Kylheku2016-12-261-0/+77
| | | | | | | | | | * share/txr/stdlib/awk.tl (sys:awk-state): New slots fw, fw-prev and fw-ranges. (sys:awk-state rec-to-f): New logic to handle self.fw. (sys:awk-let): New local fw symacro. * txr.1: Documented fw.
* doc: extended dialect notes about exceptions.Kaz Kylheku2016-12-221-0/+153
| | | | | * txr.1: New section comparing TXR Lisp exceptions with CL conditions, with a contrasting example.
* Last var may be omitted in iflet/whenlet/condlet.Kaz Kylheku2016-12-221-0/+28
| | | | | | | | * eval.c (me_iflet_whenlet): Allow the last binding to be (init-form) instead of (sym init-form), for situations in which sym is never used. * txr.1: Documented.
* doc: refer to sort function out of List Sorting.Kaz Kylheku2016-12-221-0/+18
| | | | | | * txr.1: The List Sorting section looks as if it describes all the support there is for sorting. Add references pointing to sort under Sequence Manipulation.
* doc: formatting under block/block*Kaz Kylheku2016-12-221-2/+2
| | | | | * txr.1: Address \*(TL not followed by whitespace in HTML version.
* doc: fix example comment under ifaKaz Kylheku2016-12-221-1/+8
| | | | | * txr.1: The "Rule 7" example is actually triggering Rule 6. Fix comment and add a Rule 7 example.
* Version 163.txr-163Kaz Kylheku2016-12-201-2/+2
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* doc: document place macro hashKaz Kylheku2016-12-201-0/+18
| | | | * txr.1: Describe *place-expander* variable.
* doc: document place expander hashes.Kaz Kylheku2016-12-201-0/+17
| | | | | * txr.1: Document *place-update-expander*, *place-clobber-expander* and *place-delete-expander*.
* doc: move with-gensyms section.Kaz Kylheku2016-12-201-33/+32
| | | | | * txr.1: with-gensyms moves from User-Defined Places to macros.
* New function: find-frames.Kaz Kylheku2016-12-201-1/+10
| | | | | | | | | | | | | * unwind.c (uw_find_frames_impl): New static function, made from uw_find_frame. (uw_find_frame): Reduced to wrapper around uw_find_frames_impl. (uw_find_frames): New function. (uw_late_init): Register find-frames intrinsic. * unwind.h (uw_find_frames): Declared. * txr.1: Documented.
* awk macro: endpont-exclusive ranges.Kaz Kylheku2016-12-201-1/+29
| | | | | | | | | * share/txr/stdlib/awk.tl (sys:awk-mac-let): Local macro sys:rng generalized to support code generation for ranges that exclude either endpoint. Local rng macro adjusted to target this new form. Local macros rng-, -rng, and -rng- added. * txr.1: Documented.
* Adding prog and prog* macros.Kaz Kylheku2016-12-131-0/+65
| | | | | | | | | * lisplib.c (tagbody_set_entries): Add prog and prog* to autoload list. * share/txr/stdlib/tagbody.tl (prog, prog*): New macros. * txr.1: Documented.
* Adding mismatch function.Kaz Kylheku2016-12-121-0/+41
| | | | | | | | | | * eval.c (eval_init): Register mismatch intrinsic. * lib.c (mismatch): New function. * lib.c (mismatch): Declared. * txr.1: Documented mismatch.
* New function: endp.Kaz Kylheku2016-12-101-0/+25
| | | | | | | | | | | | | This improves compatibility with other Lisp dialects in a small way. * eval.c (eval_init): Register endp intrinsic. * lib.c (endp): New function. * lib.h (endp): Declared. * txr.1: Documented endp.
* doc: wording under listpKaz Kylheku2016-12-101-2/+6
| | | | * txr.1: adding a few pointless weasel words.
* New equot macro: expand then suppress evaluation.Kaz Kylheku2016-12-081-0/+51
| | | | | | | * eval.c (me_equot): New static function. (eval_init): Register equot intrinsic macro. * txr.1: Documented equot.
* Version 162.txr-162Kaz Kylheku2016-12-071-2/+2
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* doc: dialect note about quasiquote.Kaz Kylheku2016-12-061-0/+13
| | | | | * txr.1: Document that unquoting and splicing forms may appear outside of unquote syntax.