From: Stefan Monnier Date: Wed, 18 Mar 2015 14:49:55 +0000 (-0400) Subject: * cl-generic.el (cl-generic-generalizers): Clean up after braindamage X-Git-Tag: emacs-25.0.90~2564^2~133 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8dfff871bdf0e420c6f5570e72afc80471d40d51;p=emacs.git * cl-generic.el (cl-generic-generalizers): Clean up after braindamage --- diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index c9ca92d7c09..fb11a3e25a1 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -903,8 +903,8 @@ Can only be used from within the lexical body of a primary or around method." ;; take place without requiring cl-lib. (let ((class (cl--find-class type))) (and (cl-typep class 'cl-structure-class) - (when (cl--struct-class-type class) - (error "Can't dispatch on cl-struct %S: type is %S" + (or (null (cl--struct-class-type class)) + (error "Can't dispatch on cl-struct %S: type is %S" type (cl--struct-class-type class))) (progn (cl-assert (null (cl--struct-class-named class))) t) (list cl--generic-struct-generalizer))))