diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-06-14 22:51:25 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-06-14 22:51:25 -0400 |
commit | 3c3ddb9833996729545bb4909bea359e5dbaa02e (patch) | |
tree | e128f878a1ef7b7bd3217ff2c0fb664feb6dffbb | |
parent | f43cb6490878cb8f1dcb7e45044bc635f54d5951 (diff) |
* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
Don't macroexpand before evaluating in eval-and-compile, in case
`body's macro expansion uses macros and functions defined in itself.
* src/bytecode.c (exec_byte_code):
* src/eval.c (Ffunctionp): Fix up int/Lisp_Object confusions.
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 5 | ||||
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/bytecode.c | 2 | ||||
-rw-r--r-- | src/eval.c | 7 |
5 files changed, 15 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af456bd5d2..856d4ea389 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-06-15 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): + Don't macroexpand before evaluating in eval-and-compile, in case + `body's macro expansion uses macros and functions defined in itself. + 2010-06-14 Stefan Monnier <monnier@iro.umontreal.ca> * emacs-lisp/bytecomp.el (byte-compile-check-variable): diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 490d928c5a..df93528683 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -479,10 +479,7 @@ This list lives partly on the stack.") (cons 'progn body) byte-compile-initial-macro-environment)))))) (eval-and-compile . (lambda (&rest body) - (byte-compile-eval-before-compile - (macroexpand-all - (cons 'progn body) - byte-compile-initial-macro-environment)) + (byte-compile-eval-before-compile (cons 'progn body)) (cons 'progn body)))) "The default macro-environment passed to macroexpand by the compiler. Placing a macro here will cause a macro to have different semantics when diff --git a/src/ChangeLog b/src/ChangeLog index 3e6c8f2439..017b3eb255 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-06-15 Stefan Monnier <monnier@iro.umontreal.ca> + + * bytecode.c (exec_byte_code): + * eval.c (Ffunctionp): Fix up int/Lisp_Object confusions. + 2010-06-12 Eli Zaretskii <eliz@gnu.org> * makefile.w32-in ($(BLD)/bidi.$(O)): Depend on biditype.h and diff --git a/src/bytecode.c b/src/bytecode.c index fec855c0b8..192d397c45 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -1742,7 +1742,7 @@ exec_byte_code (bytestr, vector, maxdepth, args_template, nargs, args) if (! VECTORP (vec)) wrong_type_argument (Qvectorp, vec); else if (index < 0 || index >= XVECTOR (vec)->size) - args_out_of_range (vec, index); + args_out_of_range (vec, make_number (index)); if (op == Bvec_ref) PUSH (XVECTOR (vec)->contents[index]); diff --git a/src/eval.c b/src/eval.c index 875b4498a6..71a0b11184 100644 --- a/src/eval.c +++ b/src/eval.c @@ -62,7 +62,7 @@ Lisp_Object Qinhibit_quit, Vinhibit_quit, Vquit_flag; Lisp_Object Qand_rest, Qand_optional; Lisp_Object Qdebug_on_error; Lisp_Object Qdeclare; -Lisp_Object Qcurry, Qunevalled; +Lisp_Object Qcurry; Lisp_Object Qinternal_interpreter_environment, Qclosure; Lisp_Object Qdebug; @@ -3109,7 +3109,7 @@ DEFUN ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0, } if (SUBRP (object)) - return (XSUBR (object)->max_args != Qunevalled) ? Qt : Qnil; + return (XSUBR (object)->max_args != UNEVALLED) ? Qt : Qnil; else if (FUNVECP (object)) return Qt; else if (CONSP (object)) @@ -4002,9 +4002,6 @@ before making `inhibit-quit' nil. */); Qcurry = intern_c_string ("curry"); staticpro (&Qcurry); - Qunevalled = intern_c_string ("unevalled"); - staticpro (&Qunevalled); - Qdebug = intern_c_string ("debug"); staticpro (&Qdebug); |