summaryrefslogtreecommitdiff
path: root/src/callint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/callint.c')
-rw-r--r--src/callint.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/callint.c b/src/callint.c
index 253f2b9dd09..a0efc4bbfe4 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -121,8 +121,9 @@ usage: (interactive &optional ARGS) */)
Lisp_Object
quotify_arg (register Lisp_Object exp)
{
- if (!INTEGERP (exp) && !STRINGP (exp)
- && !NILP (exp) && !EQ (exp, Qt))
+ if (CONSP (exp)
+ || (SYMBOLP (exp)
+ && !NILP (exp) && !EQ (exp, Qt)))
return Fcons (Qquote, Fcons (exp, Qnil));
return exp;
@@ -169,6 +170,9 @@ check_mark (int for_region)
static void
fix_command (Lisp_Object input, Lisp_Object values)
{
+ /* FIXME: Instead of this ugly hack, we should provide a way for an
+ interactive spec to return an expression that will re-build the args
+ without user intervention. */
if (CONSP (input))
{
Lisp_Object car;
@@ -331,11 +335,14 @@ invoke it. If KEYS is omitted or nil, the return value of
else
{
Lisp_Object input;
+ Lisp_Object funval = Findirect_function (function, Qt);
i = num_input_events;
input = specs;
/* Compute the arg values using the user's expression. */
GCPRO2 (input, filter_specs);
- specs = Feval (specs, Qnil); /* FIXME: lexbind */
+ specs = Feval (specs,
+ CONSP (funval) && EQ (Qclosure, XCAR (funval))
+ ? Qt : Qnil);
UNGCPRO;
if (i != num_input_events || !NILP (record_flag))
{