summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kyheku <kaz@kylheku.com>2020-01-29 05:30:17 -0800
committerKaz Kylheku <kaz@kylheku.com>2020-01-29 05:30:17 -0800
commit4491cf924ada98bc939e51d18ec81751cac0f5f2 (patch)
tree2e6bf956ac8e36a4eb94f1e9aa6031dacff359ca /txr.1
parent1c19f40086b23d28280334783679d00b119d8b61 (diff)
downloadtxr-4491cf924ada98bc939e51d18ec81751cac0f5f2.tar.gz
txr-4491cf924ada98bc939e51d18ec81751cac0f5f2.tar.bz2
txr-4491cf924ada98bc939e51d18ec81751cac0f5f2.zip
New function: merge-delete-package.
This is a useful function which supports the use of temporary packages over the scope of file compilation units. A file can be read under a temporary package which provides usefully customized symbol visibility consisting of an arrangement of symbols from various other packages. Then, in a single operation, thanks to this new function, that packag can be deleted and all of its local symbols (those having been newly interned over the course of the file) are transferred to some other, more permanent package. * eval.c (eval_init): merge-delete-package intrinsic registered. * lib.c (merge_delete_package): New function. * lib.h (merge_delete_package): Declared. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.123
1 files changed, 23 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index a97e3246..f8a4d0f1 100644
--- a/txr.1
+++ b/txr.1
@@ -52801,6 +52801,29 @@ are scrubbed of any foreign symbols which are the local symbols
of the deleted
.metn package .
+.coNP Function @ merge-delete-package
+.synb
+.mets (merge-delete-package dst-package <> [ src-package ])
+.syne
+.desc
+The
+.code merge-delete-package
+iterates over all of the local symbols of
+.meta src-package
+and rehomes each symbol into
+.metn dst-package .
+Then, it deletes
+.metn src-package .
+
+Note: the local symbols are identified as if using
+.codn package-local-symbols ,
+rehoming is performed as if using
+.codn rehome-sym ,
+and deleting
+.meta src-package
+is performed as if using
+.codn delete-package .
+
.coNP Function @ packagep
.synb
.mets (packagep << obj )