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

Re: Packages

On Mon Oct  4, Robert Bruce Findler asks how to associate a package
with a fred window that contains the following code at the beginning:
  (in-package "CL-USER")
  (defpackage "CLOADER" (:use "COMMON-LISP")
                        (:export *file-table* *root*
                                 *verbose* initialize-file-table))
  (in-package "CLOADER")
He wants the package cloader to be associated with the window.
Removing the in-package statement generates the error
> Error: Package CLOADER does not exist
> While executing: BUFFER-FIRST-IN-PACKAGE
> Type Command-/ to continue, Command-. to abort.
> If continued: Forms will be read in the package bound to *package*
See the Restarts menu item for further choices.

The simplest way is to define the package
outside the file and then include only the in-package cloader statement
in the fred window. To avoid the pproblem you must define the
package before you edit the window, otherwise the current package
(*package*) is bound to the undefined package.

For example, you can either define the package in the listener or
load its definition from a file. Guillame Cartier's extended apropos
system and Michael Engber's oodles-of-utils use file method.