unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Heime <heimeborgia@protonmail.com>
Cc: Heime via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: Implement subfeatures in packages
Date: Mon, 05 Aug 2024 19:39:36 +0000	[thread overview]
Message-ID: <8lv5Z3bLpqY9fgukm13xrWgJwRDAIiRaW9zl2UJinNpcxV9AA-BpX7pknpeGYtYf3G3qvTaaYM04dm7d8MkYNMRnbDjsFQFnDbJQyj-XO9Y=@protonmail.com> (raw)
In-Reply-To: <7twB2gr1NrfA2wOVt441EyEiZIObroiV84vivRai3IruG7w_Pqiysk9zjPpY_2aK0He2MMQcU58miGayRiKn8xrMNXRREl-587YdGymbN14=@protonmail.com>






Sent with Proton Mail secure email.

On Monday, August 5th, 2024 at 1:20 AM, Heime <heimeborgia@protonmail.com> wrote:

> On Monday, August 5th, 2024 at 12:09 AM, Heime heimeborgia@protonmail.com wrote:
> 
> > 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.
> > 
> > (provide FEATURE &optional SUBFEATURES)
> > 
> > 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.
> 
> 
> I want a package "tema" to provide subfeatures "lumi" and "mast"
> 
> (provide 'tema '(lumi mast))
> 
> And set up files "lumi.el" and "mast.el" for the subfeatures.
> Each of the two will include a "provide" clause at the end.
> 
> 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



      parent reply	other threads:[~2024-08-05 19:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-04 12:09 Implement subfeatures in packages Heime
2024-08-04 13:20 ` Heime
2024-08-04 16:33   ` [External] : " Drew Adams
2024-08-04 18:53     ` Heime
2024-08-04 20:44       ` Drew Adams
2024-08-05  9:50         ` Heime
2024-08-05 11:09           ` Heime
2024-08-05 19:39   ` Heime [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='8lv5Z3bLpqY9fgukm13xrWgJwRDAIiRaW9zl2UJinNpcxV9AA-BpX7pknpeGYtYf3G3qvTaaYM04dm7d8MkYNMRnbDjsFQFnDbJQyj-XO9Y=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).