diff options
| author | Noam Postavsky | 2017-11-13 12:46:13 -0500 |
|---|---|---|
| committer | Noam Postavsky | 2017-12-13 17:31:27 -0500 |
| commit | e7b1111155b3116d0c7b137e0e1d312db0f1ca80 (patch) | |
| tree | 30240245d971e634ed1ec0f60733fe6dde2e1421 /etc | |
| parent | 4cb8696e4754d815efd5fd5e26f2b6b2567a11fe (diff) | |
| download | emacs-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/NEWS | 11 |
1 files changed, 11 insertions, 0 deletions
| @@ -1462,6 +1462,17 @@ them through 'format' first. Even that is discouraged: for ElDoc | |||
| 1462 | support, you should set 'eldoc-documentation-function' instead of | 1462 | support, you should set 'eldoc-documentation-function' instead of |
| 1463 | calling 'eldoc-message' directly. | 1463 | calling 'eldoc-message' directly. |
| 1464 | 1464 | ||
| 1465 | --- | ||
| 1466 | ** Using '&rest' or '&optional' incorrectly is now an error. | ||
| 1467 | For example giving '&optional' without a following variable, or | ||
| 1468 | passing '&optional' multiple times: | ||
| 1469 | |||
| 1470 | (defun foo (&optional &rest x)) | ||
| 1471 | (defun bar (&optional &optional x)) | ||
| 1472 | |||
| 1473 | Previously, Emacs would just ignore the extra keyword, or give | ||
| 1474 | incorrect results in certain cases. | ||
| 1475 | |||
| 1465 | 1476 | ||
| 1466 | * Lisp Changes in Emacs 26.1 | 1477 | * Lisp Changes in Emacs 26.1 |
| 1467 | 1478 | ||