bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#28254: 26.0.50; SRFI-2 and-let*


From: Michael Heerdegen
Subject: bug#28254: 26.0.50; SRFI-2 and-let*
Date: Wed, 13 Sep 2017 12:16:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Mark Oteiza <mvoteiza@udel.edu> writes:

> > In `internal--listify':
> > isn't (or (listp form) (atom form)) always true?
>
> Yes, that could instead be (or form (null form)). It's meant to catch
> things like this:
>
>   (should (equal nil (and-let* ((nil) (x 1)))))

Why can't we just replace it with the equivalent `t' (and simplify the
code accordingly)?

> > Secondly, in `internal--build-binding-value-form':
> > How can it happen that (car binding) is an atom but not symbolp?  And if
> > (car binding) == var is not a symbol, how does the returned binding make
> > sense?
>
> It's an expression, like a number.
>
>   (should (equal 1 (and-let* ((2) (x 1)))))

AFAICT, this doesn't run the code I mention.  If I trace
`internal--build-binding-value-form' and try this, I get

1 -> (internal--build-binding-value-form (#:s nil) t)
1 <- internal--build-binding-value-form: (#:s (and t nil))
======================================================================
1 -> (internal--build-binding-value-form (x 1) #:s)
1 <- internal--build-binding-value-form: (x (and #:s 1))

In both cases, (car binding) evals to a symbol.


Thanks,

Michael.





reply via email to

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