On 10/30/2013 01:53 PM, Christophe Rhodes wrote:
Jeffrey Cunningham <jeffrey@jkcunningham.com> writes:

According to the ASDF documentation:
http://common-lisp.net/project/asdf/asdf.html#Using-ASDF

The system foo is loaded (and compiled, if necessary) by evaluating
the following Lisp form:
     (asdf:load-system :foo)
On some implementations (namely recent versions of ABCL, Allegro CL,
Clozure CL, CMUCL, ECL, GNU CLISP, LispWorks, MKCL, *SBCL* and XCL),
ASDF hooks into the |CL:REQUIRE| facility and you can just use:
     (require :foo)
Is this not correct?
It is correct.  Evaluating (asdf:load-system :foo) or (require :foo)
will (compile and) load the :foo system.

However, when you compile a file containing
  (require :foo)
  (describe 'foo::bar)
you do not evaluate the `(require :foo)' form; you generate code such
that, when you later load the file, (require :foo) will be executed.  So
when the compiler attempts to read the next form, (describe 'foo::bar),
the symbol 'foo::bar does not yet exist, because nothing has yet
happened to cause the "FOO" package to be created.



I get the same behavior if I compile each line within the file individually with C-c . That should be evaluating the form, right?

CL-USER> ; compiling (ASDF/OPERATE:LOAD-SYSTEM "cl-ppcre")
; compiling (DESCRIBE (QUOTE CL-PPCRE:REGEX-APROPOS))
CL-PPCRE:REGEX-APROPOS
  [symbol]

REGEX-APROPOS names a compiled function:
  Lambda-list: (REGEX &OPTIONAL PACKAGES &KEY (CASE-INSENSITIVE T))
  Derived type: (FUNCTION (T &OPTIONAL T &KEY (:CASE-INSENSITIVE T))
                 (VALUES &OPTIONAL))
  Documentation:
    Similar to the standard function APROPOS but returns a list of all
    symbols which match the regular expression REGEX.  If CASE-INSENSITIVE
    is true and REGEX isn't already a scanner, a case-insensitive scanner
    is used.
  Source file: /home/jcunningham/slime/test1.lisp

Regards,
--Jeff