[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: if-let/if-let*/and-let/..
From: |
Michael Heerdegen |
Subject: |
Re: if-let/if-let*/and-let/.. |
Date: |
Thu, 22 Feb 2018 08:55:30 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
> > (pcase spec
> > (`(,(pred symbolp) . ,rest)
> > (pcase rest
> > (`(,_) (cl-callf list spec)) ;the single binding syntax
> > (_ (signal 'error (list "if-let: Bad binding spec" spec))))))
>
> So you'd then support the SYMBOL syntax as a shorthand for (_ SYMBOL)
> *except* as the first element of the spec?
Hmm - maybe it would be even better to make `foo-let*' just do what
`foo-let' does currently - only handle a SPEC (SYMBOL EXPR) specially,
and don't signal any errors.
I also had the idea of moving `foo-let' back and limit it to the single
binding case, which would IMHO be more consistent - but that would break
stuff in Gnu Elpa, so I guess it's not an option.
Michael.
- Re: if-let/if-let*/and-let/.., (continued)
- Re: if-let/if-let*/and-let/.., Mark Oteiza, 2018/02/13
- Re: if-let/if-let*/and-let/.., Stefan Monnier, 2018/02/13
- Re: if-let/if-let*/and-let/.., Mark Oteiza, 2018/02/13
- Re: if-let/if-let*/and-let/.., Michael Heerdegen, 2018/02/14
- Re: if-let/if-let*/and-let/.., Stefan Monnier, 2018/02/14
- Re: if-let/if-let*/and-let/.., Michael Heerdegen, 2018/02/20
- Re: if-let/if-let*/and-let/.., Michael Heerdegen, 2018/02/21
- Re: if-let/if-let*/and-let/.., Stefan Monnier, 2018/02/22
- Re: if-let/if-let*/and-let/..,
Michael Heerdegen <=
- Re: if-let/if-let*/and-let/.., Michael Heerdegen, 2018/02/13
- Re: if-let/if-let*/and-let/.., Eric Abrahamsen, 2018/02/13
- Re: if-let/if-let*/and-let/.., Michael Heerdegen, 2018/02/13
- Re: if-let/if-let*/and-let/.., Eric Abrahamsen, 2018/02/13