[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

silly (?) question about mixed definitions and packages

    Date: Fri, 3 Nov 89 20:39 EST
    From: barmar@think.com (Barry Margolin)

	Date: Fri, 3 Nov 89 14:42 PST
	From: Montgomery Kosma <kosma@ALAN.LAAC-AI.Dialnet.Symbolics.COM>

	When compiling and loading the following file (a set of stubs,
	essentially, to get some other stuff to compile without actually having
	another whole system available), I am getting the following error:

	Warning:  Function CLOSE, being redefined by file TRI:MOM;BIG-MOM;DATAVAULT-SIMULATOR-HACK,
	was previously defined by file SYS:CLCP;IOFNS. OK? (Y, P, or N) Proceed.

	(in-package 'cmfs)

	(defun cmfs::close (&rest ignore))

    How did you create the package CMFS?  It looks like it is inheriting the
    CLOSE symbol from the COMMON-LISP package.  The CMFS package is not
    supposed to :USE any other packages, since it has symbols like this that
    would conflict.  It should be created with

	    (make-package 'cmfs :use nil)

    If you don't specify :USE NIL, it defaults to :USE '(COMMON-LISP).

Of course if he does this then he'll have to get rid of the in-package 'cmfs,
since he won't get the definition of lisp:defun after the in-package.