;; And now, three pages later, we export the suckers.
(dolist (sym syms)
- (package-%set-status sym package :external))
+ (if (eq (symbol-package sym) package)
+ (package-%set-status sym package :external)
+ (puthash sym :external (package-%symbols package))))
t))
(let ((other-package (pkg--package-or-lose (car imports-from))))
(dolist (sym-name (cdr imports-from))
(import (list (pkg--ensure-symbol sym-name other-package))
- gpackage))))
+ package))))
;; Exports.
(let ((old-exports nil)
{
CHECK_SYMBOL (symbol);
CHECK_PACKAGE (package);
+
if (!EQ (status, QCinternal) && !EQ (status, QCexternal))
pkg_error ("Invalid symbol status %s", status);
struct Lisp_Hash_Table *h = XHASH_TABLE (PACKAGE_SYMBOLS (package));
- ptrdiff_t i = hash_lookup (h, SYMBOL_NAME (symbol), NULL);
- eassert (i >= 0);
+ const ptrdiff_t i = hash_lookup (h, SYMBOL_NAME (symbol), NULL);
+ if (i < 0)
+ pkg_error ("Symbol '%s' is not an internal symbol in package '%s'",
+ SDATA (SYMBOL_NAME (symbol)),
+ SDATA (PACKAGE_NAMEX (package)));
ASET (h->key_and_value, 2 * i + 1, status);
return Qnil;
}