From b18f00f2577894a43c60ce09112630125516fcc6 Mon Sep 17 00:00:00 2001
From: Raymond Toy <toy.raymond@gmail.com>
Date: Tue, 18 Feb 2020 06:24:00 +0000
Subject: [PATCH] Fix #79:  Autoload ASDF in REQUIRE

When `REQUIRE` is called, autoload ASDF if it hasn't already been
loaded.  User's no longer have to load asdf explicitly anymore.

Update release notes.
---
 src/code/module.lisp            | 5 +++++
 src/general-info/release-21e.md | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/code/module.lisp b/src/code/module.lisp
index 7bed90d09..e2fb2f176 100644
--- a/src/code/module.lisp
+++ b/src/code/module.lisp
@@ -102,6 +102,11 @@
   \"contrib-games-feebs\", \"contrib-hist\", \"contrib-psgraph\",
   \"contrib-ops\", \"contrib-embedded-c\", \"contrib-sprof\", and
   \"contrib-packed-sse2\". "
+  ;; First, load asdf if it's not already loaded.  This is needed to
+  ;; load easily the contribs that use asdf.  There are no contribs
+  ;; that use defsystem, so we won't autoload defsystem.
+  (unless (featurep :asdf)
+    (load "modules:asdf/asdf"))
   (let ((saved-modules (copy-list *modules*))
         (module-name (module-name-string module-name)))
     (unless (member module-name *modules* :test #'string=)
diff --git a/src/general-info/release-21e.md b/src/general-info/release-21e.md
index eec767b5b..8e765e866 100644
--- a/src/general-info/release-21e.md
+++ b/src/general-info/release-21e.md
@@ -22,12 +22,13 @@ public domain.
     * Building with gcc8 or later doesn't work with the default -O option. Use -O1 instead.  This shouldn't really impact overall speed much.
     * Added simple support to compile with clang instead, which works. (Use x86_linux_clang).
   * Feature enhancements
-    * Update to ASDF 3.3.4
   * Changes
+    * Update to ASDF 3.3.4
   * ANSI compliance fixes:
   * Bug fixes:
   * Gitlab tickets:
     * ~~#73~~ Update clx from upstream clx
+    * ~~#79~~ Autoload ASDF when calling `REQUIRE` the first time.  User's no longer have to explicitly load ASDF anymore.
   * Other changes:
   * Improvements to the PCL implementation of CLOS:
   * Changes to building procedure:
-- 
GitLab