From: Michael Heerdegen <michael_heerdegen@web.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: if-let/if-let*/and-let/..
Date: Sat, 10 Mar 2018 18:16:37 +0100 [thread overview]
Message-ID: <87k1uj6ebu.fsf@web.de> (raw)
In-Reply-To: <83r2oruc6l.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Mar 2018 18:29:06 +0200")
[-- Attachment #1: Type: text/plain, Size: 217 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
> If you really meant and-let*, then it's covered by the "foo-let*"
> catch-all, and I assumed it, too, won't be mentioned.
Yes, I meant that.
Then this is what I have so far:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-De-obsolete-if-let-and-when-let.patch --]
[-- Type: text/x-diff, Size: 2177 bytes --]
From 065374524104eaa471d199528cff180754975def Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@web.de>
Date: Sat, 10 Mar 2018 16:39:41 +0100
Subject: [PATCH] De-obsolete `if-let' and `when-let'
Revert declaring `if-let' and `when-let' obsolete....
---
etc/NEWS | 8 ++------
lisp/emacs-lisp/subr-x.el | 6 ++----
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index eded00e655..b87715ddbc 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1301,12 +1301,8 @@ current buffer or the self-insertion takes place within a comment.
** The alist 'ucs-names' is now a hash table.
---
-** 'if-let' and 'when-let' are subsumed by 'if-let*' and 'when-let*'.
-The incumbent 'if-let' and 'when-let' are now marked obsolete.
-'if-let*' and 'when-let*' do not accept the single tuple special case.
-New macro 'and-let*' is an implementation of the Scheme SRFI-2 syntax
-of the same name. 'if-let*' and 'when-let*' now accept the same
-binding syntax as 'and-let*'.
+** 'if-let' and 'when-let' now support binding lists as defined by the
+SRFI-2.
---
** 'C-up', 'C-down', 'C-left' and 'C-right' are now defined in term
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 21dba377bf..e620e2062f 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -172,8 +172,7 @@ if-let
(declare (indent 2)
(debug ([&or (&rest [&or symbolp (symbolp form) (form)])
(symbolp form)]
- form body))
- (obsolete "use `if-let*' instead." "26.1"))
+ form body)))
(when (and (<= (length spec) 2)
(not (listp (car spec))))
;; Adjust the single binding case
@@ -183,8 +182,7 @@ if-let
(defmacro when-let (spec &rest body)
"Bind variables according to SPEC and conditionally eval BODY.
Like `when-let*' except SPEC can have the form (SYMBOL VALUEFORM)."
- (declare (indent 1) (debug if-let)
- (obsolete "use `when-let*' instead." "26.1"))
+ (declare (indent 1) (debug if-let))
(list 'if-let spec (macroexp-progn body)))
(defsubst hash-table-empty-p (hash-table)
--
2.16.1
[-- Attachment #3: Type: text/plain, Size: 719 bytes --]
But we still can't use this, because the documentation of if-let and
when-let in emacs-26 refers to the documentation of if-let* and
when-let*. I would at least also have to rewrite the docstrings of
if-let and when-let. I'm beginning to wonder if what we are
constructing here is really simpler than my initial approach.
BTW, the srfi-2 allows a SYMBOL as element of the binding spec. AFAIK
all of the macros (foo-let and foo-let*) support that case, but it's not
documented. I dunno why, the original author, Mark Oteiza
<mvoteiza@udel.edu>, didn't respond to my questions in emacs-dev. My
guess is that it hasn't been documented because the foo-let
single-binding case intersects with this syntax.
Michael.
next prev parent reply other threads:[~2018-03-10 17:16 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-11 23:51 if-let/if-let*/and-let/ Stefan Monnier
[not found] ` <87wozijhpk.fsf@web.de>
[not found] ` <jwv8tbyyx4x.fsf-monnier+emacs@gnu.org>
2018-02-12 17:32 ` if-let/if-let*/and-let/ Stefan Monnier
2018-02-13 18:23 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-02-13 19:24 ` if-let/if-let*/and-let/ Stefan Monnier
2018-02-13 20:52 ` if-let/if-let*/and-let/ John Wiegley
2018-02-13 19:31 ` if-let/if-let*/and-let/ Mark Oteiza
2018-02-13 20:49 ` if-let/if-let*/and-let/ Stefan Monnier
2018-02-14 0:07 ` if-let/if-let*/and-let/ Mark Oteiza
2018-02-14 23:07 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-02-15 3:37 ` if-let/if-let*/and-let/ Stefan Monnier
2018-02-21 4:26 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-02-22 1:08 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-02-22 5:10 ` if-let/if-let*/and-let/ Stefan Monnier
2018-02-22 7:55 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-03-03 14:12 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-03-06 15:03 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-03-06 15:31 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-03-06 15:34 ` if-let/if-let*/and-let/ John Wiegley
2018-03-06 16:03 ` if-let/if-let*/and-let/ Stefan Monnier
2018-03-06 17:40 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-03-06 19:12 ` if-let/if-let*/and-let/ Radon Rosborough
2018-03-07 2:13 ` if-let/if-let*/and-let/ James Nguyen
2018-03-07 3:42 ` if-let/if-let*/and-let/ Kaushal Modi
2018-03-06 17:40 ` if-let/if-let*/and-let/ Eli Zaretskii
2018-03-07 14:15 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-03-07 15:13 ` if-let/if-let*/and-let/ Nicolas Petton
2018-03-07 20:43 ` if-let/if-let*/and-let/ John Wiegley
2018-03-08 13:53 ` if-let/if-let*/and-let/ Eli Zaretskii
2018-03-09 15:16 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-03-09 15:32 ` if-let/if-let*/and-let/ Eli Zaretskii
2018-03-09 16:07 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-03-09 16:24 ` if-let/if-let*/and-let/ Eli Zaretskii
2018-03-09 16:33 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-03-09 18:22 ` if-let/if-let*/and-let/ Eli Zaretskii
2018-03-09 22:24 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-03-10 8:02 ` if-let/if-let*/and-let/ Eli Zaretskii
2018-03-10 15:54 ` if-let/if-let*/and-let/ Stefan Monnier
2018-03-10 16:07 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-03-10 16:29 ` if-let/if-let*/and-let/ Eli Zaretskii
2018-03-10 17:16 ` Michael Heerdegen [this message]
2018-03-10 17:29 ` if-let/if-let*/and-let/ Eli Zaretskii
2018-03-06 16:04 ` if-let/if-let*/and-let/ Eli Zaretskii
2018-03-06 17:35 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-02-13 20:54 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-02-13 21:57 ` if-let/if-let*/and-let/ Eric Abrahamsen
2018-02-13 22:39 ` if-let/if-let*/and-let/ Michael Heerdegen
2018-02-13 22:51 ` if-let/if-let*/and-let/ Eric Abrahamsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1uj6ebu.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.