summaryrefslogtreecommitdiffstats
path: root/stdlib/doc-syms.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-08-10 19:25:36 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-08-10 19:25:36 -0700
commitf8bca2bc1e7bdb6fde4e61f92fa7b8e6f2295474 (patch)
treee9b5236aa162504a8701c7452938099996bcbe85 /stdlib/doc-syms.tl
parent174c054bbc54aefa4068d2863b43fabd9914ebd2 (diff)
downloadtxr-f8bca2bc1e7bdb6fde4e61f92fa7b8e6f2295474.tar.gz
txr-f8bca2bc1e7bdb6fde4e61f92fa7b8e6f2295474.tar.bz2
txr-f8bca2bc1e7bdb6fde4e61f92fa7b8e6f2295474.zip
New feature: local symbol renaming.
The new function use-sym-as can bring a foreign symbol into a package under a different name, which is not that symbol's name. This is also featured in a new defpackage clause, :use-syms-as. With this simple relaxation in the package system, we don't require package local nicknames, which is more complicated to implement and less ergonomic, because it doesn't actually vanquish the use of ugly package prefixes on clashing symbols. * eval.c (eval_init): Register use-syms-as. * lib.c (use_sym_as): New function, made out of use_sym. (use_sym): Now a wrapper for use_sym_as. * lib.h (use_sym_as): Declared. * stdlib/package.tl (defpackage): Implement :use-syms-as clause. * tests/012/use-as.tl: New file. * txr.1: Documented, * stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'stdlib/doc-syms.tl')
-rw-r--r--stdlib/doc-syms.tl3
1 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/doc-syms.tl b/stdlib/doc-syms.tl
index be86e9d7..d1f31708 100644
--- a/stdlib/doc-syms.tl
+++ b/stdlib/doc-syms.tl
@@ -2210,7 +2210,8 @@
("url-encode" "N-0388DB26")
("use" "N-004834CC")
("use-package" "N-024BF63F")
- ("use-sym" "N-01747674")
+ ("use-sym" "N-028B0A16")
+ ("use-sym-as" "N-028B0A16")
("user-package" "N-0383342A")
("ushort" "N-0235F4E4")
("usl" "N-00BF39DD")