Assignments of VAL to (NAME ARGS...) are expanded by binding the argument
forms (VAL ARGS...) according to ARGLIST, then executing BODY, which must
return a Lisp form that does the assignment.
-The first arg in ARLIST (the one that receives VAL) receives an expression
+The first arg in ARGLIST (the one that receives VAL) receives an expression
which can do arbitrary things, whereas the other arguments are all guaranteed
to be pure and copyable. Example use:
(gv-define-setter aref (v a i) `(aset ,a ,i ,v))"
(put 'if 'gv-expander
(lambda (do test then &rest else)
- (if (macroexp-small-p (funcall do 'dummy (lambda (_) 'dummy)))
+ (if (or (not lexical-binding) ;The other code requires lexical-binding.
+ (macroexp-small-p (funcall do 'dummy (lambda (_) 'dummy))))
;; This duplicates the `do' code, which is a problem if that
;; code is large, but otherwise results in more efficient code.
`(if ,test ,(gv-get then do)
(put 'cond 'gv-expander
(lambda (do &rest branches)
- (if (macroexp-small-p (funcall do 'dummy (lambda (_) 'dummy)))
+ (if (or (not lexical-binding) ;The other code requires lexical-binding.
+ (macroexp-small-p (funcall do 'dummy (lambda (_) 'dummy))))
;; This duplicates the `do' code, which is a problem if that
;; code is large, but otherwise results in more efficient code.
`(cond