From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Volf <~@wolfsden.cz> Newsgroups: gmane.lisp.guile.bugs Subject: bug#71798: [PATCH 1/2] doc: Document #:hide. Date: Thu, 27 Jun 2024 16:07:10 +0200 Message-ID: <20240627140711.30118-1-~@wolfsden.cz> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33874"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Tomas Volf <~@wolfsden.cz> To: 71798@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Thu Jun 27 16:08:24 2024 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sMpnU-0008SR-Hx for guile-bugs@m.gmane-mx.org; Thu, 27 Jun 2024 16:08:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMpn8-0004B9-BB; Thu, 27 Jun 2024 10:08:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMpn7-00044r-8Z for bug-guile@gnu.org; Thu, 27 Jun 2024 10:08:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMpn6-0003sb-Qi for bug-guile@gnu.org; Thu, 27 Jun 2024 10:08:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sMpn8-0002Yk-Ms for bug-guile@gnu.org; Thu, 27 Jun 2024 10:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 27 Jun 2024 14:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71798 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17194972529785 (code B ref -1); Thu, 27 Jun 2024 14:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Jun 2024 14:07:32 +0000 Original-Received: from localhost ([127.0.0.1]:43009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMpmd-0002Xl-Nl for submit@debbugs.gnu.org; Thu, 27 Jun 2024 10:07:32 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:60502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1sMpmb-0002XY-SY for submit@debbugs.gnu.org; Thu, 27 Jun 2024 10:07:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sMpmX-00025m-Lg for bug-guile@gnu.org; Thu, 27 Jun 2024 10:07:26 -0400 Original-Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sMpmV-0003ly-G5 for bug-guile@gnu.org; Thu, 27 Jun 2024 10:07:25 -0400 Original-Received: by wolfsden.cz (Postfix, from userid 104) id DC4382A85B1; Thu, 27 Jun 2024 14:07:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1719497240; bh=c8v4ocMYGzv29otCIIWLoFB/10HZ/10/GITszo0FIVA=; h=From:To:Cc:Subject:Date; b=FuDSd30j/FUX9L/B8dmLIgYG6lBKihFFDjJ4+6yBHiVJ1BVvkB/MCs1b5WKAW6DC/ RJLAAFTzmYLN+nEXlzuWXnqEIF4AJwNyilzxEQo86DxtZ8SLe5FhwWmfy60adLLwAZ GVFgYuSqlaYGjDGIn6Rs6tnVU0gdwNoawPrLF0FPhzNDK8Fuf+wAOsddPUxD8oWUO5 HM3c4BzSEg06b9g4LwASMHY6M5jI+ZxORriY+TcyqcybFQJ7i1+4Lms2d7M2XJrkmd jD3gUnbkdXKz4c1bd64c3yPt0q3Do55uz5Otfd8sqHTCjz1Y8hHipWaCanbW1bKs9S lEGWXZzLSAON+8VW5w4t26XtvcjforPdZZYeyihPgc4WvhicJAOi1/H/v9tlw1iBCl 3Lw8K/H/yMFK1goXAqwrwEAxfF0M3Mjg5bp5lV2hR3TztZBgxqgFKcVPpvi98wIZPW YQ4B8KIYHtEVAETYAB6FqvW6AOlZ70v2rz2W0P51vpUnuUIQuMowvq35B8yLUHR4X7 apBNYUP97zxc5PCSBGiXhSwRpzQLXkpSO7yeOQOW1Cq56RfwZPiITsm0jG1xNS7vmD xusjvbTVg4yBtgRdnE2qhWqq3Pqeyozd/oWDSOfQsnendoYuSyH6FapOqJz6cas74R c8YsRYScQ8LwQL0kJNll8JXs= Original-Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 7029F2A6D64; Thu, 27 Jun 2024 14:07:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1719497240; bh=c8v4ocMYGzv29otCIIWLoFB/10HZ/10/GITszo0FIVA=; h=From:To:Cc:Subject:Date; b=FuDSd30j/FUX9L/B8dmLIgYG6lBKihFFDjJ4+6yBHiVJ1BVvkB/MCs1b5WKAW6DC/ RJLAAFTzmYLN+nEXlzuWXnqEIF4AJwNyilzxEQo86DxtZ8SLe5FhwWmfy60adLLwAZ GVFgYuSqlaYGjDGIn6Rs6tnVU0gdwNoawPrLF0FPhzNDK8Fuf+wAOsddPUxD8oWUO5 HM3c4BzSEg06b9g4LwASMHY6M5jI+ZxORriY+TcyqcybFQJ7i1+4Lms2d7M2XJrkmd jD3gUnbkdXKz4c1bd64c3yPt0q3Do55uz5Otfd8sqHTCjz1Y8hHipWaCanbW1bKs9S lEGWXZzLSAON+8VW5w4t26XtvcjforPdZZYeyihPgc4WvhicJAOi1/H/v9tlw1iBCl 3Lw8K/H/yMFK1goXAqwrwEAxfF0M3Mjg5bp5lV2hR3TztZBgxqgFKcVPpvi98wIZPW YQ4B8KIYHtEVAETYAB6FqvW6AOlZ70v2rz2W0P51vpUnuUIQuMowvq35B8yLUHR4X7 apBNYUP97zxc5PCSBGiXhSwRpzQLXkpSO7yeOQOW1Cq56RfwZPiITsm0jG1xNS7vmD xusjvbTVg4yBtgRdnE2qhWqq3Pqeyozd/oWDSOfQsnendoYuSyH6FapOqJz6cas74R c8YsRYScQ8LwQL0kJNll8JXs= X-Mailer: git-send-email 2.45.1 Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10872 Archived-At: * 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