Providing and Requiring Emacs Lisp Package Sub-features (How to)

Viewed 177

I have been writing Emacs Lisp packages for a while. However, I have yet to find/encounter a SINGLE example using require and provide with sub-features. Honestly, the explanation given in the Emacs Lisp manual is absolutely laughable. It tells you why you would want to use sub-features but does not show how to use them. It does not even tell you if the sub-feature parameters in require and provide should be symbols for files in the path or filenames. Hence, my question...

Could somebody provide a dead-simple example of how sub-features work? Specifically:

  1. Can you give me simple example of a package providing one feature and two sub-features?
  2. Can you give me an example requiring the above feature and only one of the two sub-features provided by the package in 1

Thanks much in advance,

Pablo

1 Answers
Related