Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to disable-package-locks?

516 views
Skip to first unread message

David

unread,
Oct 24, 2012, 9:09:18 PM10/24/12
to
Hello, I am reading P.Norvig's book PAIP(written in 1991) and try to run it's code in sbcl.

There is a defun name "symbol" in auxfns.lisp. After (load "auxfns.lisp"), sbcl report " Lock on package COMMON-LISP violated when setting fdefinition of SYMBOL while in package COMMON-LISP-USER."

How to disable package lock for defun "symbol"?

Thank you very much!

Zach Beane

unread,
Oct 24, 2012, 9:25:40 PM10/24/12
to
One option is to choose the CONTINUE restart, which will ignore the
package lock.

Another option is to use SB-EXT:UNLOCK-PACKAGE.

Another is to avoide the conflict by making your own package which
shadows CL:SYMBOL.

Zach

Pascal J. Bourguignon

unread,
Oct 25, 2012, 9:29:21 AM10/25/12
to

budden

unread,
Oct 25, 2012, 10:11:40 AM10/25/12
to
Hi!
I use the following macro, maybe it would help:
(defmacro portably-without-package-locks (&body body)
`(#+sbcl sb-ext:without-package-locks
#+allegro excl::without-package-locks
#+cmu ext:without-package-locks
#+lispworks let
#+lispworks
((lw:*handle-warn-on-redefinition* :warn)
; (dspec:*redefinition-action* :warn)
(hcl:*packages-for-warn-on-redefinition* nil))
#+clisp ext:without-package-lock #+clisp ()
#+ccl let
#+ccl ((ccl:*warn-if-redefine-kernel* nil))
#-(or allegro lispworks sbcl clisp cmu ccl)
progn
,@body))
0 new messages