From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Paul W. Rankin" via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: declare function/macro private Date: Sun, 6 Jun 2021 14:27:58 +1000 Message-ID: <0278C47F-42CE-45C4-B789-83C57DF1A191@bydasein.com> Reply-To: "Paul W. Rankin" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14251"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 06 06:29:09 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lpkPM-0003Pq-2X for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 06:29:08 +0200 Original-Received: from localhost ([::1]:50012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpkPK-0004v9-M8 for ged-emacs-devel@m.gmane-mx.org; Sun, 06 Jun 2021 00:29:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpkOf-0004EN-8w for emacs-devel@gnu.org; Sun, 06 Jun 2021 00:28:25 -0400 Original-Received: from sendmail.purelymail.com ([34.202.193.197]:41380) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpkOc-0004Z3-Vh for emacs-devel@gnu.org; Sun, 06 Jun 2021 00:28:25 -0400 DKIM-Signature: a=rsa-sha256; b=G2WE8bsjkoclemOEQyo8Hx54Zcl3agZcxceMfSIC9D+nfM3+bseTcNLd3SdCseg30U+W6se2cTl4wi9zZo/wrYx/zTEv0DiMpvv7yRlIsj2Wuv7/xykgIZcA62Kq3PjWxU4Bwv98lu7EYn1B0D+5s0af5alcJwEW1f/WtSZZnitgrNdcXnFIuW+p6yld7vC8NMnk6R7IPqCLguPM+YvaMI7p0HMqVXqwNytUqtqSyVdHtOPymWYc2bouRPJpiHGpSwRPAIowvpe8KntsonOQ5SpVK2zxhhF5h4i+Dr95TEz/K5c/i0A2KEv2SDjiDUgtmb1C2IHmVNFnfvwB10u01Q==; s=purelymail3; d=bydasein.com; v=1; bh=fK14XUDsPNLo0+pRDsSH2R+KOuwcJbNYTu2Jzr7cwVM=; h=Received:From:To; DKIM-Signature: a=rsa-sha256; b=IMkcVt401SMOhAcQlAur5tIN6tZbKWH/ycfag8QAmBN0+heTFwe0/WyMWfE0gwBpO0ONg4Cb2Oj/wr76tr76HTCX5vw0jYXrBgmizMocm1MKQ6a02g8X6ZL/C2GlhExzmhI1tXF7Nrnp4m3aqsMQDGo/10YIQbfzX9YVJoKZowQs2JxEJG3w0dNNu7GmpoOMOHEfYWXIjIxfAcrDwREyKB17tg66WvWbyFVoGuXbNZXjq3dNaYdnYrwwHsr5KrH9ikcOLiMrpu4sYI+fMf4mNiIFo1yNRPC4GcZA+FNTAeql6tT3dSgc76+2H+hcNPcHxZvOXL2dgsnEg35lNLIy0w==; s=purelymail3; d=purelymail.com; v=1; bh=fK14XUDsPNLo0+pRDsSH2R+KOuwcJbNYTu2Jzr7cwVM=; h=Feedback-ID:Received:From:To; Feedback-ID: 791:353:null:purelymail X-Pm-Original-To: emacs-devel@gnu.org Original-Received: by ip-172-30-0-164.ec2.internal (JAMES SMTP Server ) with ESMTPA ID -1916783475 for ; Sun, 06 Jun 2021 04:28:05 +0000 (UTC) X-Mailer: Apple Mail (2.3654.100.0.2.22) Received-SPF: pass client-ip=34.202.193.197; envelope-from=pwr@bydasein.com; helo=sendmail.purelymail.com 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: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270459 Archived-At: Given we have a function/macro declare interactive-only property, would = it be worthwhile to consider a `private' property? Of course there's already the convention of prefix--my-private-function, = but my thinking here is that a program could declare a function/macro as = private, then the compiler could signal a warning/error if that function = appeared in a library outside the library it was defined and declared = private. e.g. in foo.el: (defun foo-private () (declare (private "use `foo-public' instead.")) ...) (provide 'foo) ..in bar.el: (defun bar-function () (foo-private)) Compiling bar.el would signal a warning/error with hint to use = `foo-public' instead. --=20 Paul W. Rankin https://bydasein.com The single best thing you can do for the world is to delete your social = media accounts.