From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: declare function/macro private Date: Tue, 08 Jun 2021 11:46:09 -0400 Message-ID: References: <20210607033526.4c5nntohhprdkzzd@E15-2016.optimum.net> <835yyphmqx.fsf@gnu.org> <20210608011456.zc56i2i22tboxcgf@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38068"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org, 0278C47F-42CE-45C4-B789-83C57DF1A191@bydasein.com To: Boruch Baum Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 08 17:50:21 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 1lqdzh-0009fd-1D for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Jun 2021 17:50:21 +0200 Original-Received: from localhost ([::1]:34574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqdzf-000421-SW for ged-emacs-devel@m.gmane-mx.org; Tue, 08 Jun 2021 11:50:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqdvn-000118-0d for emacs-devel@gnu.org; Tue, 08 Jun 2021 11:46:20 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:56464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqdvj-00040q-7X; Tue, 08 Jun 2021 11:46:18 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B9CD244123D; Tue, 8 Jun 2021 11:46:11 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6B7674411A1; Tue, 8 Jun 2021 11:46:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1623167170; bh=UyVYKAvgztCkg0EJQojsV1JgrBMBH8UaH8y+KMQWRVY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=JlsfI7ettPmx6liaZIVblcHOnz/gYi/Mc6ZN837oMVghGOAa+CSC1F/BWZWdqq/Yx wsfT7fd1jorQLV/RejPGpdewVY+eOP2DtJYtz8f4ezdmIZ8W9E83CrbFY0TpuY2mEc l9/XmsrfhmV0+6wULYof69SygE/2sz4QsWCf9QtDtBhQqxaJJq0sXEwKYcfhiAuEJK OEnd8wCiugIMLv3fuzKCM+H+LASyVWVSFtx5mcmnR/syHX0MrD73+A1D0XZKWkwxQ6 +TlGZHiMY8HdePeRCM6D1Wg6Zyl/uO872vZK+Qgr6krrrIsZ6/uANl+aWRLVMxkfKa VtvkuWiUDDzRA== Original-Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2CCBA120DA6; Tue, 8 Jun 2021 11:46:10 -0400 (EDT) In-Reply-To: <20210608011456.zc56i2i22tboxcgf@E15-2016.optimum.net> (Boruch Baum's message of "Mon, 7 Jun 2021 21:14:56 -0400") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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:270571 Archived-At: > The point was just to support Paul Rankin's position that a '--' > substring isn't a reliable determinant of a function's public/private > nature, so can't be used as an alternative to an explicit (optional) > declaration. FWIW, I do not think a function should be considered non-internal just because it has to be declared as interactive. Similarly, the default value of a `foo-function` or `foo-hook` variable can very much be an internal function, IMO. The point of "internal" is that other code shouldn't use this directly because it is subject to change, removal, or unexpected behavior if called in a different context, ... More concretely it means that end users are recommended not to do: (define-key company-active-map [my-key-sequence] #'company--select-next-and-warn) If they want to use another key than `M-n` they should presumably do: (define-key company-active-map [my-key-sequence] (lookup-key company-active-map (kbd "M-n"))) [ I don't know if this use of "--" in company.el was a good idea, OTOH. ;-) ] Stefan