(cl-generic-generalizers): Skip types that need arguments
* lisp/emacs-lisp/cl-lib.el (cl-generic-generalizers) "cl-types-of": make sure the atomic derived type is valid.
This commit is contained in:
parent
fc4d8ce951
commit
147113b3b5
1 changed files with 7 additions and 4 deletions
|
|
@ -568,10 +568,13 @@ If ALIST is non-nil, the new pairs are prepended to it."
|
|||
nil
|
||||
(declare-function cl--type-generalizers "cl-extra" (type))
|
||||
(cl-defmethod cl-generic-generalizers :extra "cl-types-of" (type)
|
||||
"Support for dispatch on cl-types."
|
||||
(if (and (symbolp type) (cl-type-class-p (cl--find-class type)))
|
||||
(cl--type-generalizers type)
|
||||
(cl-call-next-method))))
|
||||
"Support for dispatch on cl-types."
|
||||
(if (and (symbolp type) (cl-type-class-p (cl--find-class type))
|
||||
;; Make sure this derived type can be used without arguments.
|
||||
(let ((expander (get type 'cl-deftype-handler)))
|
||||
(and expander (ignore-error (funcall expander)))))
|
||||
(cl--type-generalizers type)
|
||||
(cl-call-next-method))))
|
||||
|
||||
(defun cl--old-struct-type-of (orig-fun object)
|
||||
(or (and (vectorp object) (> (length object) 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue