diff options
| author | Stefan Monnier | 2012-10-13 21:39:56 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-10-13 21:39:56 -0400 |
| commit | 5046ef67ca8b5a2eab769b4a6e486ae060b5df13 (patch) | |
| tree | 52966f3e20b13f107db949c98bd4fabd8e811a54 | |
| parent | 8336c6b3c5a971104437ca1939fae3ab998c486a (diff) | |
| download | emacs-5046ef67ca8b5a2eab769b4a6e486ae060b5df13.tar.gz emacs-5046ef67ca8b5a2eab769b4a6e486ae060b5df13.zip | |
* lisp/emacs-lisp/gv.el (if): Don't use closures in non-lexical-binding code.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/gv.el | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d58eb0bfbbf..6c9fe7c4b47 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-10-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/gv.el (if): Don't use closures in non-lexical-binding code. | ||
| 4 | |||
| 1 | 2012-10-13 Chong Yidong <cyd@gnu.org> | 5 | 2012-10-13 Chong Yidong <cyd@gnu.org> |
| 2 | 6 | ||
| 3 | * textmodes/ispell.el (ispell-pdict-save): If flyspell-mode is | 7 | * textmodes/ispell.el (ispell-pdict-save): If flyspell-mode is |
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index 7858c183e4b..1a30d67fbbc 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el | |||
| @@ -358,7 +358,8 @@ The return value is the last VAL in the list. | |||
| 358 | 358 | ||
| 359 | (put 'if 'gv-expander | 359 | (put 'if 'gv-expander |
| 360 | (lambda (do test then &rest else) | 360 | (lambda (do test then &rest else) |
| 361 | (if (macroexp-small-p (funcall do 'dummy (lambda (_) 'dummy))) | 361 | (if (or (not lexical-binding) ;The other code requires lexical-binding. |
| 362 | (macroexp-small-p (funcall do 'dummy (lambda (_) 'dummy)))) | ||
| 362 | ;; This duplicates the `do' code, which is a problem if that | 363 | ;; This duplicates the `do' code, which is a problem if that |
| 363 | ;; code is large, but otherwise results in more efficient code. | 364 | ;; code is large, but otherwise results in more efficient code. |
| 364 | `(if ,test ,(gv-get then do) | 365 | `(if ,test ,(gv-get then do) |