From 023accd651b6c45e825546961e8feb8670b966e5 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 10 Sep 2007 02:29:42 +0000 Subject: [PATCH] (Fcall_interactively): Use Finteractive_form also for subrs and compiled functions. --- src/ChangeLog | 5 +++++ src/callint.c | 38 +++++++++++--------------------------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 228148472a5..ce9eec41ce2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-09-10 Stefan Monnier + + * callint.c (Fcall_interactively): Use Finteractive_form also for subrs + and compiled functions. + 2007-09-08 Fredrik Axelsson * window.c (prefer_window_split_horizontally): New variable. diff --git a/src/callint.c b/src/callint.c index 57c86f0a633..2ad8f445782 100644 --- a/src/callint.c +++ b/src/callint.c @@ -332,32 +332,16 @@ invoke it. If KEYS is omitted or nil, the return value of /* Decode the kind of function. Either handle it and return, or go to `lose' if not interactive, or set either STRING or SPECS. */ - if (SUBRP (fun)) - { - string = (unsigned char *) XSUBR (fun)->prompt; - if (!string) - { - lose: - wrong_type_argument (Qcommandp, function); - } - } - else if (COMPILEDP (fun)) - { - if ((XVECTOR (fun)->size & PSEUDOVECTOR_SIZE_MASK) <= COMPILED_INTERACTIVE) - goto lose; - specs = XVECTOR (fun)->contents[COMPILED_INTERACTIVE]; - } - else - { - Lisp_Object form; - GCPRO2 (function, prefix_arg); - form = Finteractive_form (function); - UNGCPRO; - if (CONSP (form)) - specs = filter_specs = Fcar (XCDR (form)); - else - goto lose; - } + { + Lisp_Object form; + GCPRO2 (function, prefix_arg); + form = Finteractive_form (function); + UNGCPRO; + if (CONSP (form)) + specs = filter_specs = Fcar (XCDR (form)); + else + wrong_type_argument (Qcommandp, function); + } /* If either SPECS or STRING is set to a string, use it. */ if (STRINGP (specs)) @@ -368,7 +352,7 @@ invoke it. If KEYS is omitted or nil, the return value of bcopy (SDATA (specs), string, SBYTES (specs) + 1); } - else if (string == 0) + else { Lisp_Object input; i = num_input_events; -- 2.39.5