From b5071fc755c4f287c7befba1150d91a985762ebd Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 25 Feb 2013 11:05:49 -0500 Subject: [PATCH] * src/callint.c (Fcall_interactively): Use the right lexical environment for `interactive' specs. * src/eval.c (Feval): Accept a lexical environment. Fixes: debbugs:13811 --- src/ChangeLog | 6 ++++++ src/callint.c | 4 ++-- src/eval.c | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 00d1f30dd46..4f2fb4c1d53 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-02-25 Stefan Monnier + + * callint.c (Fcall_interactively): Use the right lexical environment + for `interactive' specs (bug#13811). + * eval.c (Feval): Accept a lexical environment. + 2013-02-25 Paul Eggert Simplify data_start configuration (Bug#13783). diff --git a/src/callint.c b/src/callint.c index 3e295a3b26b..b0d4bcdd011 100644 --- a/src/callint.c +++ b/src/callint.c @@ -342,8 +342,8 @@ invoke it. If KEYS is omitted or nil, the return value of /* Compute the arg values using the user's expression. */ GCPRO2 (input, filter_specs); specs = Feval (specs, - CONSP (funval) && EQ (Qclosure, XCAR (funval)) - ? Qt : Qnil); + CONSP (funval) && EQ (Qclosure, XCAR (funval)) + ? CAR_SAFE (XCDR (funval)) : Qnil); UNGCPRO; if (events != num_input_events || !NILP (record_flag)) { diff --git a/src/eval.c b/src/eval.c index 030bf14bcea..5db6f9d0bf3 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1898,7 +1898,7 @@ If LEXICAL is t, evaluate using lexical scoping. */) { ptrdiff_t count = SPECPDL_INDEX (); specbind (Qinternal_interpreter_environment, - NILP (lexical) ? Qnil : Fcons (Qt, Qnil)); + CONSP (lexical) || NILP (lexical) ? lexical : Fcons (Qt, Qnil)); return unbind_to (count, eval_sub (form)); } -- 2.11.4.GIT