aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2013-02-08 11:17:18 -0500
committerStefan Monnier2013-02-08 11:17:18 -0500
commit7f526211ba8dcdc6f950a5d9857e8b9247b3cfb1 (patch)
treee54a4072a9dbdb4f9503b18f1b85910fbace84a8
parentc9586acc9719f5af71c61a24b7c5c40eb1b0905f (diff)
downloademacs-7f526211ba8dcdc6f950a5d9857e8b9247b3cfb1.tar.gz
emacs-7f526211ba8dcdc6f950a5d9857e8b9247b3cfb1.zip
* lisp/emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile):
Eval body right away, now that we do eager macroexpansion. Fixes: debbugs:13605
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emacs-lisp/byte-run.el10
2 files changed, 8 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 94ff282d58c..3dea3ed0380 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12013-02-08 Stefan Monnier <monnier@iro.umontreal.ca> 12013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile):
4 Eval body right away, now that we do eager macroexpansion (bug#13605).
5
3 * simple.el (end-of-buffer): Don't touch unrelated windows (bug#13466). 6 * simple.el (end-of-buffer): Don't touch unrelated windows (bug#13466).
4 (fundamental-mode): Use run-mode-hooks. 7 (fundamental-mode): Use run-mode-hooks.
5 8
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index b44ec68e2bf..48bcefaee1a 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -392,15 +392,15 @@ If you think you need this, you're probably making a mistake somewhere."
392Thus, the result of the body appears to the compiler as a quoted constant. 392Thus, the result of the body appears to the compiler as a quoted constant.
393In interpreted code, this is entirely equivalent to `progn'." 393In interpreted code, this is entirely equivalent to `progn'."
394 (declare (debug t) (indent 0)) 394 (declare (debug t) (indent 0))
395 ;; Not necessary because we have it in b-c-initial-macro-environment 395 (list 'quote (eval (cons 'progn body) lexical-binding)))
396 ;; (list 'quote (eval (cons 'progn body)))
397 (cons 'progn body))
398 396
399(defmacro eval-and-compile (&rest body) 397(defmacro eval-and-compile (&rest body)
400 "Like `progn', but evaluates the body at compile time and at load time." 398 "Like `progn', but evaluates the body at compile time and at load time."
401 (declare (debug t) (indent 0)) 399 (declare (debug t) (indent 0))
402 ;; Remember, it's magic. 400 ;; When the byte-compiler expands code, this macro is not used, so we're
403 (cons 'progn body)) 401 ;; either about to run `body' (plain interpretation) or we're doing eager
402 ;; macroexpansion.
403 (list 'quote (eval (cons 'progn body) lexical-binding)))
404 404
405(put 'with-no-warnings 'lisp-indent-function 0) 405(put 'with-no-warnings 'lisp-indent-function 0)
406(defun with-no-warnings (&rest body) 406(defun with-no-warnings (&rest body)