diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-11-11 22:57:26 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-11-11 22:57:26 -0800 |
commit | b530453f8e0331955b40c741a3b5dcb4bf6084d8 (patch) | |
tree | d5cbb337e16a5936e50448cf4ce596b98019682a /txr.1 | |
parent | 37c881d461e55d5c5115c6c6ed397a3df8913fd2 (diff) | |
download | txr-b530453f8e0331955b40c741a3b5dcb4bf6084d8.tar.gz txr-b530453f8e0331955b40c741a3b5dcb4bf6084d8.tar.bz2 txr-b530453f8e0331955b40c741a3b5dcb4bf6084d8.zip |
New :use-from clause in defpackage.
* share/txr/stdlib/package.tl (defpackage): Implemented
new :use-from clause.
* txr.1: Documented :use-from and made some improvements
to the defpackage documentation.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 28 |
1 files changed, 25 insertions, 3 deletions
@@ -39459,7 +39459,10 @@ If a package called already exists, then .code defpackage selects that package for further operations. Otherwise, a new, -empty package is created. +empty package is created. In either case, this package is referred +to as the +.I "present package" +in the following descriptions. The .code name @@ -39477,7 +39480,7 @@ The supported clauses are as follows: The .code :use clause specifies packages whose local symbols are to be interned -into the package as foreign symbols. Each +into the present package as foreign symbols. Each .meta package-name may be a string or symbol naming an existing package. The list of package names is processed as if by a call to @@ -39485,8 +39488,27 @@ The list of package names is processed as if by a call to .meIP (:use-syms << symbol *) The .code :use-syms -clause specifies individual symbols to be interned in the new package. +clause specifies individual symbols to be interned in the present package. The arguments are symbols. +.meIP (:use-from < package-name << symbol-name *) +The +.code :use-from +clause specifies the names of local symbols in a package denoted by +.meta package-name +to be used in the present package. All arguments of +.code :use-from +are either strings or symbols which are reduced to strings by mapping +to their names. Each +.meta symbol-name +is interned in the package identified by +.metn package-name , +which may have the effect of creating that symbol. +This symbol is expected to be a local symbol of that package. If +that is so, the symbol is brought into the present package via +.codn use-symbol . +Otherwise if the symbol is foreign to package identified by +.metn package-name , +then an error exception is thrown. .meIP (:local << symbol-name *) The .code :local |