unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33550: [PATCH] mention let* in if-let
@ 2018-11-29 19:18 Alex Branham
  2018-11-29 19:43 ` Eli Zaretskii
  2019-06-23 20:56 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: Alex Branham @ 2018-11-29 19:18 UTC (permalink / raw)
  To: 33550

[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]

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@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



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-emacs-lisp-subr-x.el-if-let-Improve-docstring-b.patch --]
[-- Type: text/x-patch, Size: 1183 bytes --]

From 0504ba0c88bc63b527e54fc92e1923e60ff5759a Mon Sep 17 00:00:00 2001
From: Alex Branham <alex.branham@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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-23 20:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-29 19:18 bug#33550: [PATCH] mention let* in if-let Alex Branham
2018-11-29 19:43 ` Eli Zaretskii
2018-11-29 19:46   ` Alex Branham
2019-04-18  0:25   ` Noam Postavsky
2019-04-18  3:44     ` Michael Heerdegen
2019-04-18  3:47       ` Michael Heerdegen
2019-06-23 20:56 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).