# HG changeset patch # User Stefan Monnier # Date 1185397404 0 # Node ID dd8905ab6eaab57a177588e036926dd744778373 # Parent 63aefab8fbc3c8b90fc5be69420cc3486a44a5bd (Finteractive_form): Check for the presence of an `interactive-form' symbol property more thoroughly. diff -r 63aefab8fbc3 -r dd8905ab6eaa src/ChangeLog --- a/src/ChangeLog Wed Jul 25 19:37:21 2007 +0000 +++ b/src/ChangeLog Wed Jul 25 21:03:24 2007 +0000 @@ -1,6 +1,11 @@ 2007-07-25 Stefan Monnier - * data.c (Finteractive_form): Use a `interactive-form' property if + * eval.c (Fcommandp): Pay attention to the `interactive-form' property. + + * data.c (Finteractive_form): Check for the presence of an + `interactive-form' symbol property more thoroughly. + + * data.c (Finteractive_form): Use an `interactive-form' property if present, analogous to the function-documentation property. 2007-07-22 Nick Roberts diff -r 63aefab8fbc3 -r dd8905ab6eaa src/data.c --- a/src/data.c Wed Jul 25 19:37:21 2007 +0000 +++ b/src/data.c Wed Jul 25 21:03:24 2007 +0000 @@ -750,15 +750,24 @@ (cmd) Lisp_Object cmd; { - Lisp_Object fun = indirect_function (cmd); - Lisp_Object tmp; - - if (SYMBOLP (cmd) - /* Use an `interactive-form' property if present, analogous to the - function-documentation property. */ - && (tmp = Fget (cmd, intern ("interactive-form")), !NILP (tmp))) - return tmp; - else if (SUBRP (fun)) + Lisp_Object fun = indirect_function (cmd); /* Check cycles. */ + + if (NILP (fun) || EQ (fun, Qunbound)) + return Qnil; + + /* Use an `interactive-form' property if present, analogous to the + function-documentation property. */ + fun = cmd; + while (SYMBOLP (fun)) + { + Lisp_Object tmp = Fget (fun, intern ("interactive-form")); + if (!NILP (tmp)) + return tmp; + else + fun = Fsymbol_function (fun); + } + + if (SUBRP (fun)) { if (XSUBR (fun)->prompt) return list2 (Qinteractive, build_string (XSUBR (fun)->prompt));