emacs-devel
[Top][All Lists]
Advanced

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

Re: Installing cond* in core


From: Stefan Monnier
Subject: Re: Installing cond* in core
Date: Sun, 17 Mar 2024 23:06:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

>   > Same here.  Are you referring to cases such as
>
>   >     (pcase EXP
>   >       ((or `(,a ,b)
>   >            5)
>   >        (BODY)))
>
>   > where `a` and `b` will be bound to nil when EXP evaluates to 5?
>
> Yes.

O, but here the (overall) pattern *does* match, and the semantics can be
described as: any variable that is not bound by the specific match but
that could be bound by other ways to match the pattern gets
a nil binding.

In the case of

    (cond*
     (:no-exit (match* PAT FORM) THEN)
     . ALWAYS)

does that mean that the semantics you provide is in ALWAYS, the vars
bound by PAT are bound to the matched values when PAT did match and they
are all bound to nil otherwise?
Or can some of the vars in PAT get bound to a non-nil value when PAT
fails to match?  If so, which ones?


        Stefan




reply via email to

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