From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Implement subfeatures in packages Date: Mon, 05 Aug 2024 19:39:36 +0000 Message-ID: <8lv5Z3bLpqY9fgukm13xrWgJwRDAIiRaW9zl2UJinNpcxV9AA-BpX7pknpeGYtYf3G3qvTaaYM04dm7d8MkYNMRnbDjsFQFnDbJQyj-XO9Y=@protonmail.com> References: <6Bcta3NoZ9mjz-meefRWzlUq18Jxbzbqs929x3IQpx1H-F6zGSh_XnJ8Lt9U-YjewgLQmo5uyrcnbDDxLXRBkwC5Y-y8jVrDScnBBnP3aRI=@protonmail.com> <7twB2gr1NrfA2wOVt441EyEiZIObroiV84vivRai3IruG7w_Pqiysk9zjPpY_2aK0He2MMQcU58miGayRiKn8xrMNXRREl-587YdGymbN14=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38317"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 05 21:40:47 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1sb3ZX-0009nk-Lc for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Aug 2024 21:40:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sb3Ys-0002IP-K2; Mon, 05 Aug 2024 15:40:11 -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 1sb3Ye-0002HH-SL for help-gnu-emacs@gnu.org; Mon, 05 Aug 2024 15:39:57 -0400 Original-Received: from mail-40130.protonmail.ch ([185.70.40.130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sb3Yb-0003Zd-Qb for help-gnu-emacs@gnu.org; Mon, 05 Aug 2024 15:39:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1722886781; x=1723145981; bh=a8uw4UGGr1pYVxuosAnVrgdSSfmastCkp70aan1K8+k=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=KcVSkUnroOJnk87UJDW5q+EpRKM/0T0MeJFA9d+k98+3aRJ6U4xNYySM6Sc9RoHXJ I4rEUi01ocK4SLOu4PzDkCV1AptXNA+F89NSfR7djJLPeYCsy+kd0EdtYAd1DDQav4 dAbUP9OX7IiSeAgXqjxH9l/nB7vfJJtX7lq5d861GUNTOB9N3pLx256AS/UxZlhrPY Z6OIuorIidkHiSWq9H/WpxSacYMVTdqjbgcgh1bbROXv4/cJqek65GCZ7EHjfwrmO5 iasnMzPAVSgalBMXPRriIbCIRDorTp4CjbbSoDTE3mdXiMAxjdQ8ECdHvJ1yzKshle 0eeEquc1IRMjg== In-Reply-To: <7twB2gr1NrfA2wOVt441EyEiZIObroiV84vivRai3IruG7w_Pqiysk9zjPpY_2aK0He2MMQcU58miGayRiKn8xrMNXRREl-587YdGymbN14=@protonmail.com> Feedback-ID: 57735886:user:proton X-Pm-Message-ID: 3d198079f41d177cf609c3304a00513183c59db2 Received-SPF: pass client-ip=185.70.40.130; envelope-from=heimeborgia@protonmail.com; helo=mail-40130.protonmail.ch 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TO_EQ_FM_DIRECT_MX=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147519 Archived-At: Sent with Proton Mail secure email. On Monday, August 5th, 2024 at 1:20 AM, Heime = wrote: > On Monday, August 5th, 2024 at 12:09 AM, Heime heimeborgia@protonmail.com= wrote: >=20 > > Reading the documentation string, one can use subfeatures. I would like= to have > > some code examples to help me implement subfeatures in my own packages. > >=20 > > (provide FEATURE &optional SUBFEATURES) > >=20 > > Announce that FEATURE is a feature of the current Emacs. > > The optional argument SUBFEATURES should be a list of symbols listing > > particular subfeatures supported in this version of FEATURE. >=20 >=20 > I want a package "tema" to provide subfeatures "lumi" and "mast" >=20 > (provide 'tema '(lumi mast)) >=20 > And set up files "lumi.el" and "mast.el" for the subfeatures. > Each of the two will include a "provide" clause at the end. >=20 > What would the provide clause look like ? Currently I have ;; file lumi.el ;; code here (provide 'tema '(lumi)) ;; end of file lumi.el ;; --------- ;; file mast.el ;; code here (provide 'tema '(mast)) ;; end of file mast.el ;; --------- How can the contents of lumi.el and mast.el be included in the package defined in tema.el ? Just using the canonical (require 'lumi) and (require 'mast) gives (error "Loading file lumi.el ;; file tema.el ;; code here (require 'lumi) ; (require 'mast) ; (provide 'tema '(lumi mast)) ;; end of file mast.el