mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-21 12:03:40 -08:00
DEFMACRO now acepts lambda lists of the form (a . b) again (broken with previous optimizations)
This commit is contained in:
parent
3009791f9f
commit
efb292b591
1 changed files with 7 additions and 0 deletions
|
|
@ -258,6 +258,13 @@
|
|||
doc decls ppn env)
|
||||
(multiple-value-setq (decls body doc)
|
||||
(find-declarations body))
|
||||
;; We turn (a . b) into (a &rest b)
|
||||
;; This is required because MEMBER (used below) does not like improper lists
|
||||
(let ((cell (last vl)))
|
||||
(when (rest cell)
|
||||
(setq vl (nconc (butlast vl 0) (list '&rest (rest cell))))))
|
||||
;; If we find an &environment variable in the lambda list, we take not of the
|
||||
;; name and remove it from the list so that DESTRUCTURE does not get confused
|
||||
(if (setq env (member '&environment vl :test #'eq))
|
||||
(setq vl (nconc (ldiff vl env) (cddr env))
|
||||
env (second env))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue