unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#71800: [PATCH 0/2] Improve documentation about using modules.
@ 2024-06-27 14:17 Tomas Volf
  2024-06-27 14:18 ` bug#71800: [PATCH 1/2] doc: Document #:hide Tomas Volf
  2024-07-02  3:31 ` bug#71800: [PATCH 0/2] Improve documentation about using modules Maxim Cournoyer
  0 siblings, 2 replies; 4+ messages in thread
From: Tomas Volf @ 2024-06-27 14:17 UTC (permalink / raw)
  To: 71800; +Cc: Tomas Volf

Document the #:hide argument.  Correct text for implication of leaving
all optional arguments out.

Tomas Volf (2):
  doc: Document #:hide.
  doc: Fix implication of omitting optional arguments.

 doc/ref/api-modules.texi | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

--
2.45.1





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#71800: [PATCH 1/2] doc: Document #:hide.
  2024-06-27 14:17 bug#71800: [PATCH 0/2] Improve documentation about using modules Tomas Volf
@ 2024-06-27 14:18 ` Tomas Volf
  2024-06-27 14:18   ` bug#71800: [PATCH 2/2] doc: Fix implication of omitting optional arguments Tomas Volf
  2024-07-02  3:31 ` bug#71800: [PATCH 0/2] Improve documentation about using modules Maxim Cournoyer
  1 sibling, 1 reply; 4+ messages in thread
From: Tomas Volf @ 2024-06-27 14:18 UTC (permalink / raw)
  To: 71800; +Cc: Tomas Volf

* 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






^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#71800: [PATCH 2/2] doc: Fix implication of omitting optional arguments.
  2024-06-27 14:18 ` bug#71800: [PATCH 1/2] doc: Document #:hide Tomas Volf
@ 2024-06-27 14:18   ` Tomas Volf
  0 siblings, 0 replies; 4+ messages in thread
From: Tomas Volf @ 2024-06-27 14:18 UTC (permalink / raw)
  To: 71800; +Cc: Tomas Volf

According to the previous wording, omitting all optional arguments led
to empty interface.  That however was not the case and was only a
documentation bug (as confirmed by wingo on IRC).  So let us fix that.

* doc/ref/api-modules.texi (Using Guile Modules): Fix implication of
omitting optional arguments.
---
 doc/ref/api-modules.texi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/ref/api-modules.texi b/doc/ref/api-modules.texi
index efe739a25..115ebbac2 100644
--- a/doc/ref/api-modules.texi
+++ b/doc/ref/api-modules.texi
@@ -212,10 +212,10 @@ 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{#: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.
+@code{#:renamer} clauses are optional.  If all are omitted, this form
+behaves identically to the previous one.  If the @code{#:select} clause
+is omitted, @var{prefix} and @var{renamer} operate on the used module's
+public interface.
 
 The @code{#:hide} operates on list of bindings in the module being
 imported, before any renaming is performed.  If both @code{#:select} and
-- 
2.45.1






^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#71800: [PATCH 0/2] Improve documentation about using modules.
  2024-06-27 14:17 bug#71800: [PATCH 0/2] Improve documentation about using modules Tomas Volf
  2024-06-27 14:18 ` bug#71800: [PATCH 1/2] doc: Document #:hide Tomas Volf
@ 2024-07-02  3:31 ` Maxim Cournoyer
  1 sibling, 0 replies; 4+ messages in thread
From: Maxim Cournoyer @ 2024-07-02  3:31 UTC (permalink / raw)
  To: Tomas Volf; +Cc: 71800

Hi Tomas!

Tomas Volf <~@wolfsden.cz> writes:

> Document the #:hide argument.  Correct text for implication of leaving
> all optional arguments out.
>
> Tomas Volf (2):
>   doc: Document #:hide.
>   doc: Fix implication of omitting optional arguments.
>

This looks good to me.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

-- 
Thanks,
Maxim





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-02  3:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-27 14:17 bug#71800: [PATCH 0/2] Improve documentation about using modules Tomas Volf
2024-06-27 14:18 ` bug#71800: [PATCH 1/2] doc: Document #:hide Tomas Volf
2024-06-27 14:18   ` bug#71800: [PATCH 2/2] doc: Fix implication of omitting optional arguments Tomas Volf
2024-07-02  3:31 ` bug#71800: [PATCH 0/2] Improve documentation about using modules Maxim Cournoyer

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).