Skip to content

Commit

Permalink
Narrow restriction.
Browse files Browse the repository at this point in the history
  • Loading branch information
okamsn committed Jan 27, 2024
1 parent d350f56 commit 8aa725c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions loopy-destructure.el
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,16 @@ Type is one of `list' or `array'."
processing-whole nil))))

((guard processing-rest)
;; `&rest' var can be ignored for clarity.
(setq rest-var first
processing-rest nil))
;; `&rest' var can be ignored for clarity,
;; but it is probably an error to ignore it
;; when there are no positional or optional variables.
(if (and (loopy--var-ignored-p first)
(null pos-var)
(null opt-var))
(signal 'loopy-&rest-missing
(list var-seq))
(setq rest-var first
processing-rest nil)))

((guard processing-opts)
(if (and (consp first)
Expand Down

0 comments on commit 8aa725c

Please sign in to comment.