emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111698: * lisp/emacs-lisp/byte-run.e


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111698: * lisp/emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile):
Date: Fri, 08 Feb 2013 11:17:18 -0500
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111698
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13605
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2013-02-08 11:17:18 -0500
message:
  * lisp/emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile):
  Eval body right away, now that we do eager macroexpansion.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/byte-run.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-02-08 15:53:49 +0000
+++ b/lisp/ChangeLog    2013-02-08 16:17:18 +0000
@@ -1,5 +1,8 @@
 2013-02-08  Stefan Monnier  <address@hidden>
 
+       * emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile):
+       Eval body right away, now that we do eager macroexpansion (bug#13605).
+
        * simple.el (end-of-buffer): Don't touch unrelated windows (bug#13466).
        (fundamental-mode): Use run-mode-hooks.
 

=== modified file 'lisp/emacs-lisp/byte-run.el'
--- a/lisp/emacs-lisp/byte-run.el       2013-01-03 02:37:57 +0000
+++ b/lisp/emacs-lisp/byte-run.el       2013-02-08 16:17:18 +0000
@@ -392,15 +392,15 @@
 Thus, the result of the body appears to the compiler as a quoted constant.
 In interpreted code, this is entirely equivalent to `progn'."
   (declare (debug t) (indent 0))
-  ;; Not necessary because we have it in b-c-initial-macro-environment
-  ;; (list 'quote (eval (cons 'progn body)))
-  (cons 'progn body))
+  (list 'quote (eval (cons 'progn body) lexical-binding)))
 
 (defmacro eval-and-compile (&rest body)
   "Like `progn', but evaluates the body at compile time and at load time."
   (declare (debug t) (indent 0))
-  ;; Remember, it's magic.
-  (cons 'progn body))
+  ;; When the byte-compiler expands code, this macro is not used, so we're
+  ;; either about to run `body' (plain interpretation) or we're doing eager
+  ;; macroexpansion.
+  (list 'quote (eval (cons 'progn body) lexical-binding)))
 
 (put 'with-no-warnings 'lisp-indent-function 0)
 (defun with-no-warnings (&rest body)


reply via email to

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