From: Drew Adams <drew.adams@oracle.com>
To: Heime <heimeborgia@protonmail.com>
Cc: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: RE: [External] : Declaring functions after provide
Date: Fri, 9 Aug 2024 22:37:40 +0000 [thread overview]
Message-ID: <DS7PR10MB523251F53BD6AF56C78415FFF3BA2@DS7PR10MB5232.namprd10.prod.outlook.com> (raw)
In-Reply-To: <EoCnDk0z1LmDt2iv8KSaGl8x02EqUoaGkzPMo94Jl0NMsOVgaBwCZ8TZjIBfhJAscd5W4MeQwlY_xvXlYbc2k2itZFjVHEjaqoFl1MTpW7w=@protonmail.com>
> > > > > I have a file that contains (provide 'tema) at the end. What
> will
> > > > > happen if I add more function after the aforementioned clause ?
> > > >
> > > > Nothing.
> > >
> > > Provided I do not use autoloads and the provide statement is not at
> the
> > > end, right ?
> >
> > Irrelevant. When code `require's the feature, the library with the`
> provide' is loaded.
> > Period.
> > ___
> >
> > The only connection with autoload is this, from
> > (elisp) `Named Features':
> >
> > When a file is loaded to satisfy an autoload, and it stops due
> > to an error in the evaluation of its contents, any function
> > definitions or ‘provide’ calls that occurred during the load
> > are undone.
>
> Had thought that they won't be recognized as part of the feature
> until the entire file is loaded.
That's correct. `require' loads the entire library/file.
If the load doesn't raise an error then everything in
the file is loaded. If it does raise an error then
nothing in the file is loaded.
The granularity of a feature (or a subfeature) is a file,
nothing smaller, because the granularity of loading is a
file, nothing smaller. (Loading can load multiple files,
of course.)
Read the doc I pointed you to, if you haven't already.
The first sentence tells you that "`provide' and
`require' are for loading files".
prev parent reply other threads:[~2024-08-09 22:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-09 21:03 Declaring functions after provide Heime
2024-08-09 21:46 ` [External] : " Drew Adams
2024-08-09 21:56 ` Heime
2024-08-09 22:15 ` Drew Adams
2024-08-09 22:24 ` Heime
2024-08-09 22:37 ` Drew Adams [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=DS7PR10MB523251F53BD6AF56C78415FFF3BA2@DS7PR10MB5232.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=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).