1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

doc: Document #:hide.

* doc/ref/api-modules.texi (Using Guile Modules): Document #:hide.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Tomas Volf 2024-06-27 16:18:51 +02:00 committed by Ludovic Courtès
parent 1a5e35f0eb
commit 130fdb0c8d
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -196,25 +196,32 @@ whose public interface is found and used.
@cindex binding renamer @cindex binding renamer
@lisp @lisp
(MODULE-NAME [#:select SELECTION] (MODULE-NAME [#:select SELECTION]
[#:hide HIDE]
[#:prefix PREFIX] [#:prefix PREFIX]
[#:renamer RENAMER]) [#:renamer RENAMER])
@end lisp @end lisp
in which case a custom interface is newly created and used. in which case a custom interface is newly created and used.
@var{module-name} is a list of symbols, as above; @var{selection} is a @var{module-name} is a list of symbols, as above; @var{selection} is a
list of selection-specs; @var{prefix} is a symbol that is prepended to list of selection-specs; @var{hide} is a list of bindings which should
imported names; and @var{renamer} is a procedure that takes a symbol and not be imported; @var{prefix} is a symbol that is prepended to imported
returns its new name. A selection-spec is either a symbol or a pair of names; and @var{renamer} is a procedure that takes a symbol and returns
symbols @code{(ORIG . SEEN)}, where @var{orig} is the name in the used its new name. A selection-spec is either a symbol or a pair of symbols
module and @var{seen} is the name in the using module. Note that @code{(ORIG . SEEN)}, where @var{orig} is the name in the used module
@var{seen} is also modified by @var{prefix} and @var{renamer}. and @var{seen} is the name in the using module. Note that @var{seen} is
also modified by @var{prefix} and @var{renamer}.
The @code{#:select}, @code{#:prefix}, and @code{#:renamer} clauses are The @code{#:select}, @code{#:hide}, @code{#:prefix}, and
optional. If all are omitted, the returned interface has no bindings. @code{#:renamer} clauses are optional. If all are omitted, the returned
If the @code{#:select} clause is omitted, @var{prefix} and @var{renamer} interface has no bindings. If the @code{#:select} clause is omitted,
operate on the used module's public interface. @var{prefix} and @var{renamer} operate on the used module's public
interface.
In addition to the above, @var{spec} can also include a @code{#:version} The @code{#:hide} operates on list of bindings in the module being
imported, before any renaming is performed. If both @code{#:select} and
@code{#:hide} contain a binding, the @code{#:hide} wins.
In addition to the above, @var{spec} can also include a @code{#:version}
clause, of the form: clause, of the form:
@lisp @lisp