Mercurial > emacs
diff src/callint.c @ 84426:74dfb3b7d8f2
(Fcall_interactively): Use Finteractive_form also for subrs
and compiled functions.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 10 Sep 2007 02:29:42 +0000 |
parents | 65663fcd2caa |
children | b51e2df52bfb |
line wrap: on
line diff
--- a/src/callint.c Mon Sep 10 01:20:44 2007 +0000 +++ b/src/callint.c Mon Sep 10 02:29:42 2007 +0000 @@ -332,32 +332,16 @@ /* 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 @@ bcopy (SDATA (specs), string, SBYTES (specs) + 1); } - else if (string == 0) + else { Lisp_Object input; i = num_input_events;