Move while syntax check from optimiser to macroexpand

* lisp/emacs-lisp/byte-opt.el (byte-optimize-while): Move check...
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): ...here.
This commit is contained in:
Mattias Engdegård 2022-08-17 20:29:27 +02:00
parent a936335aa0
commit 9a7b3673e0
2 changed files with 5 additions and 3 deletions

View file

@ -371,6 +371,11 @@ Assumes the caller has bound `macroexpand-all-environment'."
(macroexp--all-forms body))
(cdr form))
form)))
(`(while)
(macroexp-warn-and-return
"missing `while' condition"
`(signal 'wrong-number-of-arguments '(while 0))
nil 'compile-only form))
(`(setq ,(and var (pred symbolp)
(pred (not booleanp)) (pred (not keywordp)))
,expr)