1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-03 20:24:29 +00:00

* 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
This commit is contained in:
Stefan Monnier 2013-02-08 11:17:18 -05:00
parent c9586acc97
commit 7f526211ba
2 changed files with 8 additions and 5 deletions

View File

@ -1,5 +1,8 @@
2013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
* 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.

View File

@ -392,15 +392,15 @@ If you think you need this, you're probably making a mistake somewhere."
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)