diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-06-05 07:19:00 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-06-05 07:19:00 -0700 |
commit | d654390f21bc0e37addd60646f85999f0dc99a6c (patch) | |
tree | fc2e4d2c50d006dd348e96f1454bbb982aa209c5 /autoload.c | |
parent | 6282ccbbd887acea149001c94f7c4deea02e7783 (diff) | |
download | txr-d654390f21bc0e37addd60646f85999f0dc99a6c.tar.gz txr-d654390f21bc0e37addd60646f85999f0dc99a6c.tar.bz2 txr-d654390f21bc0e37addd60646f85999f0dc99a6c.zip |
New functions load-args-recurse and load-args-process
* autoload.c (load_args_set_entries, load_args_instantiate):
New static functions.
(autoload_init): Register new auto-loaded module "load-args".
* stdlib/load-args.tl: New file.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'autoload.c')
-rw-r--r-- | autoload.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -939,6 +939,22 @@ static val expander_let_instantiate(void) return nil; } +static val load_args_set_entries(val fun) +{ + val name[] = { + lit("load-args-recurse"), lit("load-args-process"), + nil + }; + autoload_set(al_fun, name, fun); + return nil; +} + +static val load_args_instantiate(void) +{ + load(scat2(stdlib_path, lit("load-args"))); + return nil; +} + val autoload_reg(val (*instantiate)(void), val (*set_entries)(val)) { @@ -1007,6 +1023,7 @@ void autoload_init(void) autoload_reg(pic_instantiate, pic_set_entries); autoload_reg(constfun_instantiate, constfun_set_entries); autoload_reg(expander_let_instantiate, expander_let_set_entries); + autoload_reg(load_args_instantiate, load_args_set_entries); reg_fun(intern(lit("autoload-try-fun"), system_package), func_n1(autoload_try_fun)); } |