;; All the above is for the following def-form.
&rest &or symbolp (symbolp &optional def-form &rest sexp))))
(let* ((name (if (consp struct) (car struct) struct))
+ (warning nil)
(opts (cdr-safe struct))
(slots nil)
(defaults nil)
(setq descs (nconc (make-list (car args) '(cl-skip-slot))
descs)))
(t
- (error "Structure option %s unrecognized" opt)))))
+ (setq warning
+ (macroexp-warn-and-return
+ (format "Structure option %S unrecognized" opt)
+ warning nil nil (list opt struct)))))))
(unless (or include-name type
;; Don't create a bogus parent to `cl-structure-object'
;; while compiling the (cl-defstruct cl-structure-object ..)
(cl-struct-define ',name ,docstring ',include-name
',(or type 'record) ,(eq named t) ',descs
',tag-symbol ',tag ',print-auto))
+ ,warning
',name)))
;;; Add cl-struct support to pcase