Function: cl-struct--pcase-macroexpander
cl-struct--pcase-macroexpander is an autoloaded function defined in
cl-macs.el.gz.
Signature
(cl-struct--pcase-macroexpander TYPE &rest FIELDS)
Documentation
Pcase patterns that match cl-struct EXPVAL of type TYPE.
Elements of FIELDS can be of the form (NAME PAT) in which case the contents of field NAME is matched against PAT, or they can be of the form NAME which is a shorthand for (NAME NAME).
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-macs.el.gz
;; Could not find source code, showing raw function object.
#[(type &rest fields)
(`(and (pred (cl-typep _ ',type)) ,@
(mapcar
(lambda (field)
(let*
((name (if (consp field) (car field) field))
(pat (if (consp field) (cadr field) field)))
`(app
,(if (eq (cl-struct-sequence-type type) 'list)
`(nth ,(cl-struct-slot-offset type name))
`(aref _ ,(cl-struct-slot-offset type name)))
,pat)))
fields)))
(t) nil
"Pcase patterns that match cl-struct EXPVAL of type TYPE.\nElements of FIELDS can be of the form (NAME PAT) in which case the\ncontents of field NAME is matched against PAT, or they can be of\nthe form NAME which is a shorthand for (NAME NAME)."]