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

Re: Clisp question



im almost sure it's not the right solution, but i run
across this problem all the time and it works for me
to define this in my init file:

#+clisp
(defun undef (symbol)
  (setf (get symbol 'clos::class) nil))

For some reason, clisp doesn't seem to let you redefine
a class once it's defined:

> (defclass bar () ((x)) )
#<STANDARD-CLASS BAR>
> (defclass bar () ((y)) )

*** - DEFCLASS: Cannot redefine class BAR
1. Break> (get 'bar 'clos::class)
#<STANDARD-CLASS BAR>
1. Break> (undef 'bar)
NIL
1. Break> (get 'bar 'clos::class)
NIL
1. Break> (defclass bar () ((y)) )
#<STANDARD-CLASS BAR>
1. Break> (defclass bar () ((z)) )

*** - DEFCLASS: Cannot redefine class BAR
2. Break>

etc...