mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 13:52:16 -08:00
Wrap the &whole argument in a temporary variable to avoid warnings when the argument is declared ignorable
This commit is contained in:
parent
c591f61d3e
commit
7df0f1af3d
2 changed files with 12 additions and 8 deletions
|
|
@ -105,6 +105,10 @@ ECL 10.5.1:
|
|||
|
||||
- ECL now captures SIGPIPE.
|
||||
|
||||
- In DEFMACRO forms, the &WHOLE argument may now be declared
|
||||
ignorable. Formerly it was always referenced by the destructuring code of
|
||||
the macro.
|
||||
|
||||
;;; Local Variables: ***
|
||||
;;; mode:text ***
|
||||
;;; fill-column:79 ***
|
||||
|
|
|
|||
|
|
@ -196,22 +196,22 @@
|
|||
(3 (list 'CDDDR v))
|
||||
))))
|
||||
|
||||
(let* ((whole nil)
|
||||
(let* ((whole (gensym))
|
||||
(*dl* nil)
|
||||
(*key-check* nil)
|
||||
(*arg-check* nil))
|
||||
(cond ((listp vl)
|
||||
(when (eq (first vl) '&whole)
|
||||
(setq whole (second vl) vl (cddr vl))
|
||||
(when (listp whole)
|
||||
(let ((new-whole (gensym)))
|
||||
(dm-vl whole new-whole nil)
|
||||
(setq whole new-whole)))))
|
||||
(let ((named-whole (second vl)))
|
||||
(setq vl (cddr vl))
|
||||
(if (listp named-whole)
|
||||
(dm-vl named-whole whole nil)
|
||||
(setq *dl* (list (list named-whole whole)))))))
|
||||
((symbolp vl)
|
||||
(setq vl (list '&rest vl)))
|
||||
(t (error "The destructuring-lambda-list ~s is not a list." vl)))
|
||||
(if (null whole) (setq whole (gensym)))
|
||||
(values (dm-vl vl whole macro) whole (nreverse *dl*) *key-check* *arg-check*))))
|
||||
(values (dm-vl vl whole macro) whole (nreverse *dl*)
|
||||
*key-check* *arg-check*))))
|
||||
|
||||
;;; valid lambda-list to DEFMACRO is:
|
||||
;;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue