From ... Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.esat.net!nslave.kpnqwest.net!nloc2.kpnqwest.net!nmaster.kpnqwest.net!nreader1.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: packages References: <1uqq7.7$VG1.374872@newnews.cc.stevens-tech.edu> <87snd8udg0.fsf@orion.bln.pmsf.de> Mail-Copies-To: never From: Erik Naggum Message-ID: <3210592018171463@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 44 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 27 Sep 2001 15:06:59 GMT X-Complaints-To: newsmaster@Norway.EU.net X-Trace: nreader1.kpnqwest.net 1001603219 193.71.66.49 (Thu, 27 Sep 2001 17:06:59 MET DST) NNTP-Posting-Date: Thu, 27 Sep 2001 17:06:59 MET DST Xref: archiver1.google.com comp.lang.lisp:17029 * Vojin Jovanovic > But, what if it means exactly that, what do I do then? I want to have my > own definition of CLOS. When I load a file I want to shadow the current > CLOS and use my own provided by the file. Is it possible to do that > somehow automatically? There is usually a top-level or system-global variable that you can set in an initialization file, but the way these things usually work is that you really do set the package you want to work within. E.g., a system I built which uses an initialization file to set things up because so much depends on weird interactions, goes like this: (setf tpl::*saved-package* (setf *package* (setf (system:global-symbol-value '*package*) (find-package :tdn)))) (setf (cdr (assoc '*package* *cl-default-special-bindings*)) '(find-package :tdn)) (when (lep:lep-is-running) (lep::eval-in-emacs "(setq-default fi:package \"tdn\")")) > In CLISP when it is started the *package* is COMMON-LISP-USER. This > package uses packages "COMMON-LISP" and "EXIT". Now if you do > (in-package "COMMON-LISP") and (unuse-package "CLOS"), the > (package-use-list "COMMON-LISP") gives nil, but defmacro defclass is > still available for example? Again, what is the purpose of unuse-package > function if the definitions from "CLOS" are still available? Are you sure you know in which package the symbol defclass is defined? You just look so hopelessly confused it is hard to figure out if giving you any answers will help you, but the clue to your problems is probably to define your own package and import only the symbols you need from the common-lisp package and _not_ to import the symbols you would like to redefine. I think you need to re-examine your problem before you start to complain about the solutions. /// -- Why did that stupid George W. Bush turn to Christian fundamentalism to fight Islamic fundamentalism? Why use terms like "crusade", which only invokes fear of a repetition of that disgraceful period of Christianity with its _sustained_ terrorist attacks on Islam? He is _such_ an idiot.