From: Drew Adams <drew.adams@oracle.com>
To: Emanuel Berg <incal@dataswamp.org>,
"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : Re: Add code from other files
Date: Thu, 4 Jul 2024 21:32:07 +0000 [thread overview]
Message-ID: <SJ0PR10MB54886DAEA8E9DBA29C4754B1F3DE2@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87sewplyk9.fsf@dataswamp.org>
> Use `provide' downmost in all your files, and whenever one
> function is needed in some other file, you `require' that file
> first (topmost) in THAT file.
>
> Is a good way to do it.
>
> If you byte-compile it will tell you, if some file uses
> something not defined in that file, and also not require'd
> from another where it is.
>
> So you can both find bugs that way and find out what needs to
> be required by what.
In addition, there's this case (not too common),
mentioned in (elisp) `Named Features':
Although top-level calls to 'require' are evaluated
during byte compilation, 'provide' calls are not.
Therefore, you can ensure that a file of definitions
is loaded before it is byte-compiled by including a
'provide' followed by a 'require' for the same feature,
as in the following example.
(provide 'my-feature) ; Ignored by byte compiler,
; evaluated by 'load'.
(require 'my-feature) ; Evaluated by byte compiler.
next prev parent reply other threads:[~2024-07-04 21:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 23:44 Add code from other files uzibalqa
[not found] ` <6d098cab-1a96-4eb7-a4c3-1a4cf0fb3270@starynkevitch.net>
[not found] ` <V97NPYqXKDP9XylZkSZkh_dbBhS_SXc-ezIV4g8yCaobeMBzi1PSGBdP_G-h1WeRu0XUm-K_jVE9BefEr63O8ceF3tJ3hxj-38oe3fagwTU=@proton.me>
[not found] ` <2fa9f251-0c84-46b5-9a88-b525eb79a413@starynkevitch.net>
[not found] ` <SxRPEQkups5RAB4wfD8msM9ggAwSxaOuYjUV59-Pxcn5TgvbJgDPPqP1zLvhdl6zG3K-7t_YaVzemmmdxMwUh3avOOXJALTilqiHvtdbVnU=@proton.me>
2024-07-04 12:10 ` uzibalqa
2024-07-04 17:16 ` uzibalqa
2024-07-04 17:32 ` uzibalqa
2024-07-04 19:57 ` Emanuel Berg
2024-07-04 21:28 ` uzibalqa
2024-07-04 21:50 ` Emanuel Berg
2024-07-04 21:32 ` Drew Adams [this message]
2024-07-04 22:07 ` [External] : " uzibalqa
2024-07-04 23:20 ` uzibalqa
2024-07-05 0:12 ` Emanuel Berg
2024-07-05 19:59 ` uzibalqa
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=SJ0PR10MB54886DAEA8E9DBA29C4754B1F3DE2@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=incal@dataswamp.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).