when compiling, etc a buffer which doesnt have a package declaration, you sometimes dont get the package which was selected at editor entry. I think the problem may be that it does a pack-set instead of a package-bind type operation when you compile-defun, etc.