emacs-devel
[Top][All Lists]
Advanced

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

Re: Update of pcase docs for the elisp manual


From: Eli Zaretskii
Subject: Re: Update of pcase docs for the elisp manual
Date: Fri, 29 Jan 2016 11:45:23 +0200

> From: Michael Heerdegen <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Thu, 28 Jan 2016 19:37:50 +0100
> 
> > I understand.  I'm just saying that it would be better to provide an
> > example of using 'let' which actually made use of the reason for its
> > introduction: binding symbols to values.
> 
> It's not easy to find an example for a usage of the let pattern that is
> not too complicated and can't be replaced trivially with other patterns,
> and does also make at least a bit of sense.
> 
> I maybe would suggest something like this:
> 
> --8<---------------cut here---------------start------------->8---
> (pcase some-list
>   ((and (let value (calculate-some-value))
>         (or (pred (member  value))
>             (pred (assoc   value))))
>    value))
> --8<---------------cut here---------------end--------------->8---

Thanks.  I went with Stefan's example instead.

> How is the state of the documentation now?  Do you need some more
> contributions, or should I proofread everything?

I'm done adjudicating all the comments, see commit d7a93ef.

In this message:

  http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01404.html

I asked for an example of rewriting a QPattern-based example using
only UPatterns; perhaps you could contribute such an example for the
manual.  And, of course, any other comments and patches are welcome.

Thanks.



reply via email to

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