aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorFabián Ezequiel Gallina2014-06-30 01:11:43 -0300
committerFabián Ezequiel Gallina2014-06-30 01:11:43 -0300
commitc08f8be29f4f6d107da5cc38d614519df7a6ab11 (patch)
tree1aa7c297a73c23b8c0dccc1242601c1eb02033dc /etc
parentf8e16324a038417f0180b76c77c60313c880e74c (diff)
downloademacs-c08f8be29f4f6d107da5cc38d614519df7a6ab11.tar.gz
emacs-c08f8be29f4f6d107da5cc38d614519df7a6ab11.zip
New if-let, when-let, thread-first and thread-last macros.
* lisp/emacs-lisp/subr-x.el (internal--listify, internal--check-binding) (internal--build-binding-value-form, internal--build-binding) (internal--build-bindings): New functions. (internal--thread-argument, thread-first, thread-last) (if-let, when-let): New macros. * test/automated/subr-x-tests.el (subr-x-test-if-let-single-binding-expansion) (subr-x-test-if-let-single-symbol-expansion) (subr-x-test-if-let-nil-related-expansion) (subr-x-test-if-let-malformed-binding, subr-x-test-if-let-true) (subr-x-test-if-let-false, subr-x-test-if-let-bound-references) (subr-x-test-if-let-and-lazyness-is-preserved) (subr-x-test-when-let-body-expansion) (subr-x-test-when-let-single-binding-expansion) (subr-x-test-when-let-single-symbol-expansion) (subr-x-test-when-let-nil-related-expansion) (subr-x-test-when-let-malformed-binding) (subr-x-test-when-let-true, subr-x-test-when-let-false) (subr-x-test-when-let-bound-references) (subr-x-test-when-let-and-lazyness-is-preserved) (subr-x-test-thread-first-no-forms) (subr-x-test-thread-first-function-names-are-threaded) (subr-x-test-thread-first-expansion) (subr-x-test-thread-last-no-forms) (subr-x-test-thread-last-function-names-are-threaded) (subr-x-test-thread-last-expansion): New tests.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS8
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 1fc4a218d76..85f996f8486 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -178,6 +178,14 @@ permissions set to temporary values (e.g., for creating private files).
178** Functions `rmail-delete-forward' and `rmail-delete-backward' take an 178** Functions `rmail-delete-forward' and `rmail-delete-backward' take an
179optional repeat-count argument. 179optional repeat-count argument.
180 180
181---
182** New macros `if-let' and `when-let' allow defining bindings and to
183 execute code depending whether all values are a true.
184
185---
186** New macros `thread-first' and `thread-last' allow threading a form
187 as the first or last argument of subsequent forms.
188
181 189
182* Changes in Emacs 24.5 on Non-Free Operating Systems 190* Changes in Emacs 24.5 on Non-Free Operating Systems
183 191