EXPORT-IMPORTEXPORT in CLtL says that it makes its argument symbols ``become accessible as external symbols in PACKAGE.'' It does not specify how much work EXPORT should be willing to go through in order to make this happen.EXPORT are not in [the argument] PACKAGE then EXPORT should do an implicit IMPORT of those symbols and then should EXPORT them. In most cases where a package is going to export symbols from another
package, the idiom
(IMPORT '(symbol-a symbol-b ...)) (EXPORT '(symbol-a symbol-b ...))
must be written. Maintaining both lists consistently is more error-prone
and it would be simpler if one could just write the EXPORT call and not
worry about the import.
EXPORT are not in [the argument] PACKAGE then EXPORT should signal a continuable error. If continued, EXPORT should IMPORT the indicated symbols and continue.MAKE-PACKAGE 'EXPORT-TEST-PACKAGE :USE '()) (EXPORT '(CAR CDR CONS) (FIND-PACKAGE "EXPORT-TEST-PACKAGE"))EXPORT-IMPORT:NO. (The error we signal says you can "Proceed without any special action." which doesn't make it completely clear that it will do the implicit import, but that's apparently what happens.)
[Pitman is pretty sure several implementations implement EXPORT-IMPORT:YES because we get a lot of bug reports from people who seem to think this is something guaranteed but who cannot cite a passage saying where. Hopefully people will volunteer more cases here.]
EXPORT-IMPORT:YES is upward-compatible, though produces diminished error checking. A change to EXPORT-IMPORT:NO might cause some users to have to write an explicit call to IMPORT in some package declarations. Since continuing the error mentioned in the EXPORT-IMPORT:NO spec will produce the EXPORT-IMPORT:YES behavior, though, the incompatibility should be easy to work around in a transition period.EXPORT.EXPORT does in a case which seems to come up fairly often in practice.EXPORT-IMPORT:NO.