1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 10:31:37 -08:00

Use EXPVAL in docstrings of patterns defined using pcase-defmacro

Suggested by Drew Adams (Bug#31311).

* lisp/emacs-lisp/cl-macs.el (cl-struct): ...here.
* lisp/emacs-lisp/eieio.el (eieio): Likewise.
* lisp/emacs-lisp/radix-tree.el (radix-tree-leaf): Likewise.
* lisp/emacs-lisp/rx.el (rx): Likewise.
This commit is contained in:
Thien-Thi Nguyen 2018-05-21 17:16:31 +02:00
parent 7e8227ed68
commit 4d7e54acff
4 changed files with 11 additions and 9 deletions

View file

@ -2887,10 +2887,10 @@ non-nil value, that slot cannot be set via `setf'.
;;;###autoload
(pcase-defmacro cl-struct (type &rest fields)
"Pcase patterns to match cl-structs.
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)."
"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)."
(declare (debug (sexp &rest [&or (sexp pcase-PAT) sexp])))
`(and (pred (pcase--flip cl-typep ',type))
,@(mapcar