On Mon, 26 Aug 2002 11:41:20 +0900, "Stephen J. Turnbull" said:
I think this is a vain hope. If they require each other, they
require
each other. Those REQUIRES aren't in there for no reason....
The problem I've seen is the following:
1) Author A produces Package A that allows better handling of Elvish.
2) Author B produces an add-on B that allows tagging of Early, Middle, and
Late Elvish - this of course does a (require 'A) for the obvious reasons.
3) Author A then adds hooks for B in his package. He does a (require 'B)
to get the stuff loaded in.
Can somebody tell me the *right* XEmacs Lisp idiom for this, that will
Do The Right Thing when run *or* byte-compiled either with or without B:
(if (available-feature 'B-elvish) (add-elvish-hook 'early-elvish))
(In other words, if it's available use it - but if it's not available so
"early-elvish" isn't a known symbol, don't throw a complaint either.
I'd be willing to bet a lot of the "circular" requires are actually
'conditional
requires' that the programmer can't understand how to get it to not throw
errors (I freely admit I looked at the docs for 'require' and the byte
compiler for about 45 minutes last night, and came away totally unenlightened
on how to do this....)
--
Valdis Kletnieks
Computer Systems Senior Engineer
Virginia Tech