GNU bug report logs - #28254
26.0.50; SRFI-2 and-let*

Previous Next

Package: emacs;

Reported by: Mark Oteiza <mvoteiza <at> udel.edu>

Date: Sun, 27 Aug 2017 20:12:02 UTC

Severity: wishlist

Found in version 26.0.50

Done: Mark Oteiza <mvoteiza <at> udel.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mark Oteiza <mvoteiza <at> udel.edu>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 28254 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> users.sourceforge.net>
Subject: bug#28254: 26.0.50; SRFI-2 and-let*
Date: Tue, 12 Sep 2017 09:09:47 -0400
On 12/09/17 at 02:39pm, Michael Heerdegen wrote:
> Mark Oteiza <mvoteiza <at> udel.edu> writes:
> 
> > Any comments?
> 
> Some notes on the documentation of `if-let*' after your patch:
> 
> |   "Bind variables according to VARLIST and eval THEN or ELSE.
> | Each binding is evaluated in turn with `let*',
> 
> Maybe comparing with `let*' is confusing after the change, because not
> all bindings must look like (SYMBOL EXPRESSION) any more.  I think when
> we just remove the two words "with `let*'", the documentation is still
> fine.

I agree, thanks.

> | and evaluation stops if a binding value is nil.  If all are non-nil,
> | the value of THEN is returned, or the last form in ELSE is returned.
> 
> Not really related to your change, but: Maybe we should additionally say
> that THEN can refer to the bindings made in the VARLIST, but ELSE to
> none, not even to those that resulted in non-nil values before
> "failing".

That's not true though--you can refer to the bindings in either branch:

    (if-let* ((x 2) (y nil)) x (list x y))

 => (let* ((x (and t 2)) (y (and x nil))) (if y x (list x y)))

> | Each element of VARLIST is a symbol (which is bound to nil) [...]
> 
> Did we agree that we drop this useless case?

Ah yes, this is no longer the case in this patch.  Good catch, thank
you.




This bug report was last modified 7 years and 253 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.