[Top][All Lists]

[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.


reply via email to

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