Commit 5046ef67 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/emacs-lisp/gv.el (if): Don't use closures in non-lexical-binding code.

parent 8336c6b3
2012-10-14 Stefan Monnier <>
* emacs-lisp/gv.el (if): Don't use closures in non-lexical-binding code.
2012-10-13 Chong Yidong <>
* textmodes/ispell.el (ispell-pdict-save): If flyspell-mode is
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment