[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Anaphoric macros: increase visibility
From: |
Rolf Ade |
Subject: |
Re: Anaphoric macros: increase visibility |
Date: |
Sat, 14 Jan 2017 03:30:19 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Michael Heerdegen <address@hidden> writes:
> We also already have `if-let' and `when-let' in "subr-x". They are like
> `aif' and `awhen' but you specify "it" explicitly.
Since you mention them ... I probably miss something obvious but from
looking at the documentation of if-let
if-let is a Lisp macro in ‘subr-x.el’.
(if-let BINDINGS THEN &rest ELSE)
Process BINDINGS and if all values are non-nil eval THEN, else ELSE.
Argument BINDINGS is a list of tuples whose car is a symbol to be
bound and (optionally) used in THEN, and its cadr is a sexp to be
evalled to set symbol’s value. In the special case you only want
to bind a single value, BINDINGS can just be a plain tuple.
and of if-when
when-let is a Lisp macro in ‘subr-x.el’.
(when-let BINDINGS &rest BODY)
Process BINDINGS and if all values are non-nil eval BODY.
Argument BINDINGS is a list of tuples whose car is a symbol to be
bound and (optionally) used in BODY, and its cadr is a sexp to be
evalled to set symbol’s value. In the special case you only want
to bind a single value, BINDINGS can just be a plain tuple.
I don't get, why there is a need for if-when?
- Anaphoric macros: increase visibility, Tino Calancha, 2017/01/13
- Re: Anaphoric macros: increase visibility, Michael Heerdegen, 2017/01/13
- Re: Anaphoric macros: increase visibility,
Rolf Ade <=
- Re: Anaphoric macros: increase visibility, Tino Calancha, 2017/01/14
- Re: Anaphoric macros: increase visibility, Michael Heerdegen, 2017/01/14
- On the naming/behavior of {if, when}-let (was Re: Anaphoric macros: increase visibility), Mark Oteiza, 2017/01/14
- Re: Anaphoric macros: increase visibility, Michael Heerdegen, 2017/01/14
- Re: Anaphoric macros: increase visibility, Tino Calancha, 2017/01/15
- Re: Anaphoric macros: increase visibility, Stefan Monnier, 2017/01/15
- Re: Anaphoric macros: increase visibility, Tino Calancha, 2017/01/15