* lisp/emacs-lisp/gv.el (gv-define-setter): Fix doc typo.
[bpt/emacs.git] / lisp / emacs-lisp / gv.el
index 7858c18..3dd021f 100644 (file)
@@ -194,7 +194,7 @@ well for simple place forms.
 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))"
@@ -358,7 +358,8 @@ The return value is the last VAL in the list.
 
 (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)
@@ -376,7 +377,8 @@ The return value is the last VAL in the list.
 
 (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