[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
one last (?) package question
Thanks for the responses to my previous questions about package usage.
I'm still having a problem as follows:
I'm trying to create a system called zelda. I want the zelda function
names and variables to be interned into the ZELDA package. I want to be
able to use a few of these defuns without prefix when the USER package
is current. The following load file almost does what I want. The
files in the defsystem that are in the [ai.vis] directory are loaded
into the CL-USER package (controlled by the file's attribute list) and
those in the [jfk.zelda] directory are loaded into the ZELDA package.
Now, when I load this file, I get an error message at the point that the
(use-package 'zelda 'user) is run which says USER already contains the
symbols u d tt db l s h sd m st restart w e eplan editdb and findme.
When I RESUME from this error the problematic symbols in the USER package
are uninterned, and the program does exactly what I wanted.
Question: How did those symbols get interned into the USER package?
Is this load file correctly arranged?
Thanks,
Joe Karnicky
;;; -*- Mode: LISP; Base: 10; Syntax: Common-lisp -*-
(defpackage zelda
(:prefix-name "ZELDA")
(:use symbolics-common-lisp)
(:export u d tt db l s h sd m st restart w e eplan editdb findme))
(defvar zelda::*task-directory nil "directory for jfk task plist files")
(setq zelda::*task-directory "vax:[jfk.zelda]")
;;; defines the TASKS file system for the LISPM
(defun mkzelda ()
;; No interesting value is returned
(defsystem zelda
(:short-name "ZELDA"
:pretty-name "Task Management System"
:default-pathname "vax:[jfk.zelda]"
:journal-directory "vax:[jfk.zelda]"
:patchable nil)
(:module init ("zelinit" "vax:[ai.vis]vrcinit"))
(:module newlispfns ("vax:[ai.vis]newlispfns" "vax:[ai.vis]store"
"vax:[ai.vis]util" "vax:[ai.vis]screenops")
(:in-order-to :compile (:load init)))
(:module taskfns ("taskfns"
"maketfns"
"recurring"
"tasklispmfns"
"zeldevfns"
"zelsearch" "zeltime"
"zelutil" "zelhelp")
(:in-order-to :compile (:load init)
(:load newlispfns))); some macros here
(:module graphics ("zelgraph"
)
(:in-order-to :compile (:load init)
(:load newlispfns)))
) ;defsystem
(compile-system 'zelda :update-directory nil :increment-version nil
:query nil)
(format t "~%~%The TASKS system is now defined"))
;;;top level calls to make the system
(mkzelda)
(use-package 'zelda 'user)
(in-package 'zelda)
(set-up-windows) ;defined in taskfns.lsp
(startt) ;read in tasks from file
(in-package 'user)