If I edit a file like the following:
(defpackage :foo
(:use :cl))
(in-package :foo)
...more core...
before the DEFPACKAGE has been evaluated, symbol completion
doesn't work in the file -- nor does much anything.
I can't even C-c C-c the DEFPACKAGE, because that part of the
file is taken to be in FOO as well.
So, two suggestions:
* If there is an IN-PACKAGE form, assume the part of the
file above it is in CL-USER.
* If there is an IN-PACKAGE form, but the package doesn't exist,
assume the whole file is in CL-USER.
Cheers,
-- Nikodemus