[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pcase.el: Add type pattern

From: Adam Porter
Subject: Re: [PATCH] pcase.el: Add type pattern
Date: Tue, 10 Mar 2020 10:46:24 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Michael Heerdegen <address@hidden> writes:

>> +(pcase-defmacro type (type)
>> +  "Pcase pattern that matches objects of TYPE."
>> +  `(pred (pcase--flip cl-typep ',type)))
> If we keep these semantics and the patch is accepted, you should
> document here what TYPE means.  IIUC any type expression allowed by
> `cl-typep' will be possible, right?  Then just say something like "TYPE
> is a type name like in `cl-typep'" or so.

Thanks, that's a good point.  This new patch improves the docstring and
the changes to the manual, and it adds a test for a cl-typep list form.
Please let me know if more improvements should be made.

Attachment: 0001-lisp-emacs-lisp-cl-macs.el-Add-type-pattern.patch
Description: Add pcase type pattern, etc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]