summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorMark Oteiza <mvoteiza@udel.edu>2017-09-12 12:44:45 -0400
committerMark Oteiza <mvoteiza@udel.edu>2017-09-12 13:18:06 -0400
commit4612b2a2b37026bef5a9b8e92878a15dabb9b261 (patch)
tree2434bb2f510047ae9570086c424266743411a39f /etc
parentc87331a1c04aa4be55be7b944680e4ec486f5b04 (diff)
downloademacs-4612b2a2b37026bef5a9b8e92878a15dabb9b261.tar.gz
Implement and-let*
This also includes changes to if-let and when-let. The single tuple special case is ambiguous, and binding a symbol to nil is not as useful as binding it to its value outside the lexical scope of the binding. (Bug#28254) * etc/NEWS: Mention. * lisp/emacs-lisp/subr-x.el (internal--listify): (internal--build-binding-value-form): Extend to account for solitary symbols and (EXPR) items in binding varlist. (if-let*, when-let*): Nix single tuple case and incumbent bind-symbol-to-nil behavior. (and-let*): New macro. (if-let, when-let): Mark obsolete. Redefine in terms of if-let*, so they implicitly gain the new features without breaking existing code. * test/lisp/emacs-lisp/subr-x-tests.el: Adjust tests for: lack of single-tuple special case, lack of binding solitary symbols to nil, and the introduction of uninterned symbols for (EXPR) bindings. Add SRFI-2 test suite adapted to Elisp.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS12
1 files changed, 8 insertions, 4 deletions
diff --git a/etc/NEWS b/etc/NEWS
index af29b29264d..03ef05b2a30 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1137,6 +1137,14 @@ be disabled by setting 'byte-compile-cond-use-jump-table' to nil.
** 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*'.
+
+---
** 'C-up', 'C-down', 'C-left' and 'C-right' are now defined in term
mode to send the same escape sequences that xterm does. This makes
things like forward-word in readline work.
@@ -1529,10 +1537,6 @@ It avoids unnecessary consing (and garbage collection).
** 'gensym' is now part of Elisp.
---
-** 'if-let*', 'when-let*', and 'and-let*' are new in subr-x.el.
-The incumbent 'if-let' and 'when-let' are now aliases.
-
----
** Low-level list functions like 'length' and 'member' now do a better
job of signaling list cycles instead of looping indefinitely.