all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Add code from other files
Date: Thu, 04 Jul 2024 21:57:58 +0200	[thread overview]
Message-ID: <87sewplyk9.fsf@dataswamp.org> (raw)
In-Reply-To: GtfM3d3eNldZolvL79q5oPtm_BMjXOL074mcdSoP46hhGjzvLGE2QJymglg5NS-pceZmhebSJBWkDj8KBZ3VRFJEcA8EyajOKKg4RnezX2E=@proton.me

uzibalqa wrote:

> I have a main file and three auxiliary files. I can use
> `load` for the auxiliary files and use `provide` for the
> main file. Would this be the correct approach ?

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.

-- 
underground experts united
https://dataswamp.org/~incal




  parent reply	other threads:[~2024-07-04 19:57 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 [this message]
2024-07-04 21:28               ` uzibalqa
2024-07-04 21:50                 ` Emanuel Berg
2024-07-04 21:32               ` [External] : " Drew Adams
2024-07-04 22:07                 ` 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

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

  git send-email \
    --in-reply-to=87sewplyk9.fsf@dataswamp.org \
    --to=incal@dataswamp.org \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.