[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Circular dependencies between libraries - what to do?
From: |
Emanuel Berg |
Subject: |
Re: Circular dependencies between libraries - what to do? |
Date: |
Sat, 20 Sep 2014 23:40:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Thorsten Jolitz <tjolitz@gmail.com> writes:
> (1) how to use require without introducing circular
> dependencies?
At the top of a file, put the require:s, e.g.,
(require 'message)
(require 'moggle)
Then at the end of the file, put
(provide 'message-my)
If you get a circular dependency (which I never did
with 50+ init files, but OK, I suppose I would solve it
like this) - break the file in two so you get clean
modules.
Here is an example:
http://user.it.uu.se/~embe8573/conf/emacs-init/gnus/message-my.el
Then compile everything - here is the makefile I use,
if you don't have one and need to write one -
http://user.it.uu.se/~embe8573/conf/emacs-init/Makefile
When compiling, it'll say what functions and variables
are (can be) uncovered. They aren't (most often),
actually, but fix it anyway to get even better code,
and to make the compiler shut up :)
> (2) how to declare their dependencies as MELPA
> packages?
I never used MELPA so I don't know. Do tell if when
find out :)
Good luck!
--
underground experts united
- Re: Circular dependencies between libraries - what to do?,
Emanuel Berg <=