aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorStefan Monnier2010-12-13 22:37:44 -0500
committerStefan Monnier2010-12-13 22:37:44 -0500
commitdefb141157dfa37c33cdcbfa4b29c702a8fc9edf (patch)
treee0d40af60254aa9f680ce46f26c77bc47655b07f /src/bytecode.c
parent7a600d54c026061eee6db4e499802f524e7ebe00 (diff)
downloademacs-defb141157dfa37c33cdcbfa4b29c702a8fc9edf.tar.gz
emacs-defb141157dfa37c33cdcbfa4b29c702a8fc9edf.zip
Try and be more careful about propagation of lexical environment.
* src/eval.c (apply_lambda, funcall_lambda): Remove lexenv arg. (Feval): Always eval in the empty environment. (eval_sub): New function. Use it for all calls to Feval that should evaluate in the lexical environment of the caller. Pass `closure's as is to apply_lambda. (Ffuncall): Pass `closure's as is to funcall_lambda. (funcall_lambda): Extract lexenv for `closure's, when applicable. Also use lexical scoping for the &rest argument, if applicable. * src/lisp.h (eval_sub): Declare. * src/lread.c (readevalloop): Remove `evalfun' argument. * src/print.c (Fwith_output_to_temp_buffer): * src/data.c (Fsetq_default): Use eval_sub. * lisp/emacs-lisp/bytecomp.el (byte-compile-condition-case): Use push.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index d94b19b2d07..01fce0577b0 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -901,7 +901,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
901 901
902 case Bsave_window_excursion: 902 case Bsave_window_excursion:
903 BEFORE_POTENTIAL_GC (); 903 BEFORE_POTENTIAL_GC ();
904 TOP = Fsave_window_excursion (TOP); 904 TOP = Fsave_window_excursion (TOP); /* FIXME: lexbind */
905 AFTER_POTENTIAL_GC (); 905 AFTER_POTENTIAL_GC ();
906 break; 906 break;
907 907
@@ -915,13 +915,13 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
915 Lisp_Object v1; 915 Lisp_Object v1;
916 BEFORE_POTENTIAL_GC (); 916 BEFORE_POTENTIAL_GC ();
917 v1 = POP; 917 v1 = POP;
918 TOP = internal_catch (TOP, Feval, v1); 918 TOP = internal_catch (TOP, Feval, v1); /* FIXME: lexbind */
919 AFTER_POTENTIAL_GC (); 919 AFTER_POTENTIAL_GC ();
920 break; 920 break;
921 } 921 }
922 922
923 case Bunwind_protect: 923 case Bunwind_protect:
924 record_unwind_protect (Fprogn, POP); 924 record_unwind_protect (Fprogn, POP); /* FIXME: lexbind */
925 break; 925 break;
926 926
927 case Bcondition_case: 927 case Bcondition_case:
@@ -930,7 +930,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
930 handlers = POP; 930 handlers = POP;
931 body = POP; 931 body = POP;
932 BEFORE_POTENTIAL_GC (); 932 BEFORE_POTENTIAL_GC ();
933 TOP = internal_lisp_condition_case (TOP, body, handlers); 933 TOP = internal_lisp_condition_case (TOP, body, handlers); /* FIXME: lexbind */
934 AFTER_POTENTIAL_GC (); 934 AFTER_POTENTIAL_GC ();
935 break; 935 break;
936 } 936 }