GNU bug report logs -
#33550
[PATCH] mention let* in if-let
Previous Next
Reported by: Alex Branham <alex.branham <at> gmail.com>
Date: Thu, 29 Nov 2018 19:20:01 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33550 in the body.
You can then email your comments to 33550 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33550
; Package
emacs
.
(Thu, 29 Nov 2018 19:20:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alex Branham <alex.branham <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 29 Nov 2018 19:20:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi -
I think this patch makes it much clearer that if-let functions like
let*, not let.
Thanks,
Alex
From 0504ba0c88bc63b527e54fc92e1923e60ff5759a Mon Sep 17 00:00:00 2001
From: Alex Branham <alex.branham <at> gmail.com>
Date: Thu, 29 Nov 2018 12:57:43 -0600
Subject: [PATCH] ; * lisp/emacs-lisp/subr-x.el (if-let): Improve docstring by
mentioning let*
---
lisp/emacs-lisp/subr-x.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 7fab9083e8..8278f50d1d 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -158,9 +158,9 @@ are non-nil, then the result is non-nil."
(defmacro if-let (spec then &rest else)
"Bind variables according to SPEC and eval THEN or ELSE.
-Each binding is evaluated in turn, 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.
+Each binding is evaluated in turn, as in `let*', 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.
Each element of SPEC is a list (SYMBOL VALUEFORM) which binds
SYMBOL to the value of VALUEFORM. An element can additionally be
--
2.19.1
[0001-lisp-emacs-lisp-subr-x.el-if-let-Improve-docstring-b.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33550
; Package
emacs
.
(Thu, 29 Nov 2018 19:44:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 33550 <at> debbugs.gnu.org (full text, mbox):
> From: Alex Branham <alex.branham <at> gmail.com>
> Date: Thu, 29 Nov 2018 13:18:54 -0600
>
> I think this patch makes it much clearer that if-let functions like
> let*, not let.
Doesn't "in turn" already say that?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33550
; Package
emacs
.
(Thu, 29 Nov 2018 19:47:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 33550 <at> debbugs.gnu.org (full text, mbox):
On Thu 29 Nov 2018 at 13:43, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> I think this patch makes it much clearer that if-let functions like
>> let*, not let.
>
> Doesn't "in turn" already say that?
Yes, it does, you're completely right. This just emphasizes that if-let
acts like let* for those of us who perhaps skim documentation instead of
reading closely sometimes. I found it somewhat surprising that if-let
versus if-let* is not like let versus let*.
Alex
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33550
; Package
emacs
.
(Thu, 18 Apr 2019 00:27:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 33550 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Alex Branham <alex.branham <at> gmail.com>
>> Date: Thu, 29 Nov 2018 13:18:54 -0600
>>
>> I think this patch makes it much clearer that if-let functions like
>> let*, not let.
>
> Doesn't "in turn" already say that?
I think it's a bit ambiguous, it could refer to the fact that each
VALUEFORM is evaluted sequentially. It's not entirely obvious that
previous SYMBOL bindings are available to follow VALUEFORMs, as in let*
rather than let (which would be the more obvious choice for if-let as
opposed to if-let*).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33550
; Package
emacs
.
(Thu, 18 Apr 2019 03:46:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 33550 <at> debbugs.gnu.org (full text, mbox):
Noam Postavsky <npostavs <at> gmail.com> writes:
> I think it's a bit ambiguous, it could refer to the fact that each
> VALUEFORM is evaluted sequentially. It's not entirely obvious that
> previous SYMBOL bindings are available to follow VALUEFORMs, as in let*
> rather than let
Yes, true.
> (which would be the more obvious choice for if-let as opposed to
> if-let*).
if-let mainly exists for backward compatibility (to support the "SPEC of
the form (SYMBOL SOMETHING)" case). I don't recall why we didn't
obsolete it when we added if-let*, but AFAIR the special case had been
quite widely used. Anyway, I think we should not change it.
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33550
; Package
emacs
.
(Thu, 18 Apr 2019 03:48:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 33550 <at> debbugs.gnu.org (full text, mbox):
Michael Heerdegen <michael_heerdegen <at> web.de> writes:
> Anyway, I think we should not change it.
Sorry for having been unclear: I meant we shouldn't change the binding
behavior, I don't want to oppose clarifying the docstring.
Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33550
; Package
emacs
.
(Sun, 23 Jun 2019 20:57:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 33550 <at> debbugs.gnu.org (full text, mbox):
Alex Branham <alex.branham <at> gmail.com> writes:
> (defmacro if-let (spec then &rest else)
> "Bind variables according to SPEC and eval THEN or ELSE.
> -Each binding is evaluated in turn, 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.
> +Each binding is evaluated in turn, as in `let*', 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.
Yes, I think that's clearer, because it's a bit surprising that if-let
is more like let* than let. I've now applied your change to the Emacs
trunk.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 23 Jun 2019 20:57:04 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.1, send any further explanations to
33550 <at> debbugs.gnu.org and Alex Branham <alex.branham <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 23 Jun 2019 20:57:04 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 22 Jul 2019 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 273 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.