* lisp/emacs-lisp/gv.el (if): Don't use closures in non-lexical-binding code.
This commit is contained in:
parent
8336c6b3c5
commit
5046ef67ca
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2012-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/gv.el (if): Don't use closures in non-lexical-binding code.
|
||||
|
||||
2012-10-13 Chong Yidong <cyd@gnu.org>
|
||||
|
||||
* 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)
|
||||
|
|
Loading…
Add table
Reference in a new issue