emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110540: * lisp/emacs-lisp/gv.el (if)


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110540: * lisp/emacs-lisp/gv.el (if): Don't use closures in non-lexical-binding code.
Date: Sat, 13 Oct 2012 21:39:56 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110540
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sat 2012-10-13 21:39:56 -0400
message:
  * lisp/emacs-lisp/gv.el (if): Don't use closures in non-lexical-binding code.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/gv.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-13 09:51:59 +0000
+++ b/lisp/ChangeLog    2012-10-14 01:39:56 +0000
@@ -1,3 +1,7 @@
+2012-10-14  Stefan Monnier  <address@hidden>
+
+       * emacs-lisp/gv.el (if): Don't use closures in non-lexical-binding code.
+
 2012-10-13  Chong Yidong  <address@hidden>
 
        * textmodes/ispell.el (ispell-pdict-save): If flyspell-mode is

=== modified file 'lisp/emacs-lisp/gv.el'
--- a/lisp/emacs-lisp/gv.el     2012-09-26 14:41:05 +0000
+++ b/lisp/emacs-lisp/gv.el     2012-10-14 01:39:56 +0000
@@ -358,7 +358,8 @@
 
 (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]