Commit c4f46926 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(Finteractive_form): Check for the presence of an

`interactive-form' symbol property more thoroughly.
parent b7de6024
2007-07-25 Stefan Monnier <monnier@iro.umontreal.ca> 2007-07-25 Stefan Monnier <monnier@iro.umontreal.ca>
   
* 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. present, analogous to the function-documentation property.
   
2007-07-22 Nick Roberts <nickrob@snap.net.nz> 2007-07-22 Nick Roberts <nickrob@snap.net.nz>
......
...@@ -750,15 +750,24 @@ Value, if non-nil, is a list \(interactive SPEC). */) ...@@ -750,15 +750,24 @@ Value, if non-nil, is a list \(interactive SPEC). */)
(cmd) (cmd)
Lisp_Object cmd; Lisp_Object cmd;
{ {
Lisp_Object fun = indirect_function (cmd); Lisp_Object fun = indirect_function (cmd); /* Check cycles. */
Lisp_Object tmp;
if (NILP (fun) || EQ (fun, Qunbound))
if (SYMBOLP (cmd) return Qnil;
/* Use an `interactive-form' property if present, analogous to the
function-documentation property. */ /* Use an `interactive-form' property if present, analogous to the
&& (tmp = Fget (cmd, intern ("interactive-form")), !NILP (tmp))) function-documentation property. */
return tmp; fun = cmd;
else if (SUBRP (fun)) 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) if (XSUBR (fun)->prompt)
return list2 (Qinteractive, build_string (XSUBR (fun)->prompt)); return list2 (Qinteractive, build_string (XSUBR (fun)->prompt));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment