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

define-condition, defclass

I've noticed that clisp differs from some other lisps in how it
translates define-condition.  Suppose you just want to define a
subclass of CONDITION.  CLtL2 doesn't seem to say whether you need
to write
(define-condition foo (CONDITION) nil) or whether
(define-condition foo () nil) is enough.

First question - does anyone know whether the ANSI standard says any
more about this?

In clisp the second works but the first does not!  Part of the reason
is that in clisp, define-condition ALWAYS adds CONDITION at the end:

> (macroexpand-1 '(define-condition foo (bar baz) nil))

The rest of the problem is that defclass doesn't like the resulting 
two occurrences of CONDITION.  I don't see why that's a problem.  It 
seems to work in other lisps.

Second question - is this a bug in clisp, or am I missing something?