From: Tomas Volf <~@wolfsden.cz>
To: 71798@debbugs.gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: bug#71798: [PATCH 1/2] doc: Document #:hide.
Date: Thu, 27 Jun 2024 16:07:10 +0200 [thread overview]
Message-ID: <20240627140711.30118-1-~@wolfsden.cz> (raw)
* doc/ref/api-modules.texi (Using Guile Modules): Document #:hide.
---
doc/ref/api-modules.texi | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/doc/ref/api-modules.texi b/doc/ref/api-modules.texi
index 9f2bba02d..efe739a25 100644
--- a/doc/ref/api-modules.texi
+++ b/doc/ref/api-modules.texi
@@ -196,25 +196,32 @@ whose public interface is found and used.
@cindex binding renamer
@lisp
(MODULE-NAME [#:select SELECTION]
+ [#:hide HIDE]
[#:prefix PREFIX]
[#:renamer RENAMER])
@end lisp
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
-list of selection-specs; @var{prefix} is a symbol that is prepended to
-imported names; and @var{renamer} is a procedure that takes a symbol and
-returns its new name. A selection-spec is either a symbol or a pair of
-symbols @code{(ORIG . SEEN)}, where @var{orig} is the name in the used
-module and @var{seen} is the name in the using module. Note that
-@var{seen} is also modified by @var{prefix} and @var{renamer}.
+list of selection-specs; @var{hide} is a list of bindings which should
+not be imported; @var{prefix} is a symbol that is prepended to imported
+names; and @var{renamer} is a procedure that takes a symbol and returns
+its new name. A selection-spec is either a symbol or a pair of symbols
+@code{(ORIG . SEEN)}, where @var{orig} is the name in the used module
+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
-optional. If all are omitted, the returned interface has no bindings.
-If the @code{#:select} clause is omitted, @var{prefix} and @var{renamer}
-operate on the used module's public interface.
+The @code{#:select}, @code{#:hide}, @code{#:prefix}, and
+@code{#:renamer} clauses are optional. If all are omitted, the returned
+interface has no bindings. If the @code{#:select} clause is omitted,
+@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:
@lisp
--
2.45.1
next reply other threads:[~2024-06-27 14:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 14:07 Tomas Volf [this message]
2024-06-27 14:07 ` bug#71799: [PATCH 2/2] doc: Fix implication of omitting optional arguments Tomas Volf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='20240627140711.30118-1-~@wolfsden.cz' \
--to=~@wolfsden.cz \
--cc=71798@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).