diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-07-25 21:03:24 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-07-25 21:03:24 +0000 |
commit | c4f46926ae2af8e668c3995eb4fec74bcc83b9ef (patch) | |
tree | 070e865b48835fbb489093c01dbad1e95149fc09 /src | |
parent | b7de6024f602f75a8c49ae36645845de07d00672 (diff) | |
download | emacs-c4f46926ae2af8e668c3995eb4fec74bcc83b9ef.tar.gz |
(Finteractive_form): Check for the presence of an
`interactive-form' symbol property more thoroughly.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/data.c | 27 |
2 files changed, 24 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bfdf9abb5d2..49613185ae4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,11 @@ 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. 2007-07-22 Nick Roberts <nickrob@snap.net.nz> diff --git a/src/data.c b/src/data.c index f705aa559e8..15169d3d3f4 100644 --- a/src/data.c +++ b/src/data.c @@ -750,15 +750,24 @@ Value, if non-nil, is a list \(interactive SPEC). */) (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)); |