aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2010-06-14 22:51:25 -0400
committerStefan Monnier2010-06-14 22:51:25 -0400
commit3c3ddb9833996729545bb4909bea359e5dbaa02e (patch)
treee128f878a1ef7b7bd3217ff2c0fb664feb6dffbb
parentf43cb6490878cb8f1dcb7e45044bc635f54d5951 (diff)
downloademacs-3c3ddb9833996729545bb4909bea359e5dbaa02e.tar.gz
emacs-3c3ddb9833996729545bb4909bea359e5dbaa02e.zip
* 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/ChangeLog6
-rw-r--r--lisp/emacs-lisp/bytecomp.el5
-rw-r--r--src/ChangeLog5
-rw-r--r--src/bytecode.c2
-rw-r--r--src/eval.c7
5 files changed, 15 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index af456bd5d2e..856d4ea3898 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12010-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
4 Don't macroexpand before evaluating in eval-and-compile, in case
5 `body's macro expansion uses macros and functions defined in itself.
6
12010-06-14 Stefan Monnier <monnier@iro.umontreal.ca> 72010-06-14 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * emacs-lisp/bytecomp.el (byte-compile-check-variable): 9 * emacs-lisp/bytecomp.el (byte-compile-check-variable):
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 490d928c5a0..df93528683c 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -479,10 +479,7 @@ This list lives partly on the stack.")
479 (cons 'progn body) 479 (cons 'progn body)
480 byte-compile-initial-macro-environment)))))) 480 byte-compile-initial-macro-environment))))))
481 (eval-and-compile . (lambda (&rest body) 481 (eval-and-compile . (lambda (&rest body)
482 (byte-compile-eval-before-compile 482 (byte-compile-eval-before-compile (cons 'progn body))
483 (macroexpand-all
484 (cons 'progn body)
485 byte-compile-initial-macro-environment))
486 (cons 'progn body)))) 483 (cons 'progn body))))
487 "The default macro-environment passed to macroexpand by the compiler. 484 "The default macro-environment passed to macroexpand by the compiler.
488Placing a macro here will cause a macro to have different semantics when 485Placing a macro here will cause a macro to have different semantics when
diff --git a/src/ChangeLog b/src/ChangeLog
index 3e6c8f24398..017b3eb2553 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12010-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * bytecode.c (exec_byte_code):
4 * eval.c (Ffunctionp): Fix up int/Lisp_Object confusions.
5
12010-06-12 Eli Zaretskii <eliz@gnu.org> 62010-06-12 Eli Zaretskii <eliz@gnu.org>
2 7
3 * makefile.w32-in ($(BLD)/bidi.$(O)): Depend on biditype.h and 8 * makefile.w32-in ($(BLD)/bidi.$(O)): Depend on biditype.h and
diff --git a/src/bytecode.c b/src/bytecode.c
index fec855c0b83..192d397c45f 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1742,7 +1742,7 @@ exec_byte_code (bytestr, vector, maxdepth, args_template, nargs, args)
1742 if (! VECTORP (vec)) 1742 if (! VECTORP (vec))
1743 wrong_type_argument (Qvectorp, vec); 1743 wrong_type_argument (Qvectorp, vec);
1744 else if (index < 0 || index >= XVECTOR (vec)->size) 1744 else if (index < 0 || index >= XVECTOR (vec)->size)
1745 args_out_of_range (vec, index); 1745 args_out_of_range (vec, make_number (index));
1746 1746
1747 if (op == Bvec_ref) 1747 if (op == Bvec_ref)
1748 PUSH (XVECTOR (vec)->contents[index]); 1748 PUSH (XVECTOR (vec)->contents[index]);
diff --git a/src/eval.c b/src/eval.c
index 875b4498a61..71a0b111849 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -62,7 +62,7 @@ Lisp_Object Qinhibit_quit, Vinhibit_quit, Vquit_flag;
62Lisp_Object Qand_rest, Qand_optional; 62Lisp_Object Qand_rest, Qand_optional;
63Lisp_Object Qdebug_on_error; 63Lisp_Object Qdebug_on_error;
64Lisp_Object Qdeclare; 64Lisp_Object Qdeclare;
65Lisp_Object Qcurry, Qunevalled; 65Lisp_Object Qcurry;
66Lisp_Object Qinternal_interpreter_environment, Qclosure; 66Lisp_Object Qinternal_interpreter_environment, Qclosure;
67 67
68Lisp_Object Qdebug; 68Lisp_Object Qdebug;
@@ -3109,7 +3109,7 @@ DEFUN ("functionp", Ffunctionp, Sfunctionp, 1, 1, 0,
3109 } 3109 }
3110 3110
3111 if (SUBRP (object)) 3111 if (SUBRP (object))
3112 return (XSUBR (object)->max_args != Qunevalled) ? Qt : Qnil; 3112 return (XSUBR (object)->max_args != UNEVALLED) ? Qt : Qnil;
3113 else if (FUNVECP (object)) 3113 else if (FUNVECP (object))
3114 return Qt; 3114 return Qt;
3115 else if (CONSP (object)) 3115 else if (CONSP (object))
@@ -4002,9 +4002,6 @@ before making `inhibit-quit' nil. */);
4002 Qcurry = intern_c_string ("curry"); 4002 Qcurry = intern_c_string ("curry");
4003 staticpro (&Qcurry); 4003 staticpro (&Qcurry);
4004 4004
4005 Qunevalled = intern_c_string ("unevalled");
4006 staticpro (&Qunevalled);
4007
4008 Qdebug = intern_c_string ("debug"); 4005 Qdebug = intern_c_string ("debug");
4009 staticpro (&Qdebug); 4006 staticpro (&Qdebug);
4010 4007