diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-08-17 20:29:27 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2022-08-19 21:23:48 +0200 |
commit | 9a7b3673e09fe839163bf35e25e37e2ac62bc272 (patch) | |
tree | 4693abec1d7a57ff7b8cd751a0ac0f89616bd912 /lisp/emacs-lisp/macroexp.el | |
parent | a936335aa02bd6d142ce61563e6cf70a1a7c271b (diff) | |
download | emacs-9a7b3673e09fe839163bf35e25e37e2ac62bc272.tar.gz emacs-9a7b3673e09fe839163bf35e25e37e2ac62bc272.tar.bz2 emacs-9a7b3673e09fe839163bf35e25e37e2ac62bc272.zip |
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.
Diffstat (limited to 'lisp/emacs-lisp/macroexp.el')
-rw-r--r-- | lisp/emacs-lisp/macroexp.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 40ed0344dfd..c3ba1b36d44 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -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) |