summaryrefslogtreecommitdiffstats
path: root/txr.1
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* bugfix: , *sym printed as ,*sym.Kaz Kylheku2016-12-061-3/+20
| | | | | | | | | | | | | | We are lacking read/print consistency in the handling of unquotes applied to symbols whose names begin with a star. * lib.c (unquote_star_check): New static function. (obj_print_impl): Use unquote_star check when printing an unquote to determine whether a space is needed so that the result doesn't read back as a ,* splice. * txr.1: Change "should" to "must": the whitespace is absolutely required in , *x*. Adding more discussion as a dialect note.
* Adding functions fr^$, fr^, fr$ and frr.Kaz Kylheku2016-12-011-0/+77
| | | | | | | | * regex.c (regex_range_full_fun, regex_range_left_fun, regex_range_right_fun, regex_range_search_fun): New functions. (regex_init): Register fr^$, fr^, fr$ and frr intrinsics. * txr.1: Documented.
* Awk macro prn becomes function.Kaz Kylheku2016-12-011-8/+13
| | | | | | | | | | | | | | | | | | | | * share/txr/stdlib/awk.tl (sys:awk-let): Renamed to sys:awk-mac-let. Macrolet prn removed from here. (sys:awk-fun-let): New macro, provides awk functions. The prn function removed from sys:awk-mac-let is generated here. (sys:awk-fun-shadowing-env): New function. (awk): Follow rename of sys:awk-let. When expanding p-action forms, use only sys:awk-mac-let; do not include the awk functions, which do not "vaporize" unlike local macros. To compensate for not including the functions, extend the macro environment with one that shadows the functions, so that during this expansion, any global macros of the same name as awk local functions are properlly hidden. In the final expansion, include the awk functions. * txr.1: Updated documentation to consistently call prn an awk function everywhere.
* bugfix: awk must consume *args*.Kaz Kylheku2016-11-291-0/+32
| | | | | | | | | | | | | | | | | | | | | | This problem happens when awk is issued from the command line followed by one or more arguments as exemplified by the usage txr -e '(awk ...) arg ... . In this case, after awk processes the args as input sources and completes, TXR resumes processing the command line arguments and wants to open arg as a script file! To address this problem, when awk defaults on using *args* as input sources, it consumes *args* by clearing the variable to nil. TXR's command line processing already reacts to changes in *args* by evaluated forms. Code that wants *args* to be left alone by awk can explicitly pass them in using (awk (:inputs *args*) ...). * share/txr/stdlib/awk.tl (sys:awk-state): Move default initialization of inputs into :postinit. If there are no inputs by :postinit time, then take *args* or *stdin*. If *args* is used in this default manner, then consume *args*. * txr.1: Documented.
* conformance: handle macro wrong clause syntax.Kaz Kylheku2016-11-291-0/+21
| | | | | | | | | | | | | | | | Contrary to the documentation, handle doesn't in fact have the same syntax as catch. It passes the exception symbol to clauses as the leftmost argument, followed by the exception arguments, whereas catch passes only the exception arguments. * share/txr/stdlib/except.tl (handle): Do not pass the exception sybmol as the leftmost argument, unless operating in TXR 161 or earlier compatibility. * tests/012/except.tl: drop exception symbol argument from handle clause. * txr.1: Compatibility note added.
* doc: return value of slotsetKaz Kylheku2016-11-291-0/+5
| | | | * txr.1: slotset returns the stored value.
* Version 161.txr-161Kaz Kylheku2016-11-271-2/+2
| | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise.
* Version 160.txr-160Kaz Kylheku2016-11-271-2/+2
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* doc: update package example.Kaz Kylheku2016-11-271-16/+16
| | | | | | | | * txr.1: The example illustrating a module with private and public symbols is altered to show a superior practice: use a no-fallback package for the public symbols, and be in the private package when defining the module.
* doc: note about circular notation and hashes.Kaz Kylheku2016-11-271-0/+13
| | | | | * txr.1: Document that circular notation works with eql-based hash tables, but not equal-based.
* doc: grammar under str-inaddr-net.Kaz Kylheku2016-11-271-2/+2
| | | | | * txr.1: eliminate 'large enough to "covers"' with rewording.
* doc: fix references to nonexistent title.Kaz Kylheku2016-11-261-4/+4
| | | | | * txr.1: References to EXCEPTIONS corrected to the correct Exceptions section title.
* New function to access exception subtype map.Kaz Kylheku2016-11-261-3/+114
| | | | | | | | | | * uwind.c (exception_subtype_map): New static function. (uw_late_init): Register exception-subtype-map intrinsic function. * txr.1: Exception types are described in more detail. A complete diagram of the existing hierarchyis given, and the exception-subtype-map funtion is documented.