aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorNoam Postavsky2017-11-13 12:46:13 -0500
committerNoam Postavsky2017-12-13 17:31:27 -0500
commite7b1111155b3116d0c7b137e0e1d312db0f1ca80 (patch)
tree30240245d971e634ed1ec0f60733fe6dde2e1421 /etc
parent4cb8696e4754d815efd5fd5e26f2b6b2567a11fe (diff)
downloademacs-e7b1111155b3116d0c7b137e0e1d312db0f1ca80.tar.gz
emacs-e7b1111155b3116d0c7b137e0e1d312db0f1ca80.zip
Mention new strictness for &optional, &rest in arglists (Bug#29165)
* etc/NEWS: Explain that '&optional' not followed by a variable is now an error. * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda, cl--do-&aux) (cl--do-arglist): Also reject '&optional', '&rest', or '&aux' not followed by a variable for consistency. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-bad-arglist): New test.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS11
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 64b53d88c83..5324a0944ea 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1462,6 +1462,17 @@ them through 'format' first. Even that is discouraged: for ElDoc
1462support, you should set 'eldoc-documentation-function' instead of 1462support, you should set 'eldoc-documentation-function' instead of
1463calling 'eldoc-message' directly. 1463calling 'eldoc-message' directly.
1464 1464
1465---
1466** Using '&rest' or '&optional' incorrectly is now an error.
1467For example giving '&optional' without a following variable, or
1468passing '&optional' multiple times:
1469
1470 (defun foo (&optional &rest x))
1471 (defun bar (&optional &optional x))
1472
1473Previously, Emacs would just ignore the extra keyword, or give
1474incorrect results in certain cases.
1475
1465 1476
1466* Lisp Changes in Emacs 26.1 1477* Lisp Changes in Emacs 26.1
1467 1478