aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c27
1 files changed, 18 insertions, 9 deletions
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). */)
750 (cmd) 750 (cmd)
751 Lisp_Object cmd; 751 Lisp_Object cmd;
752{ 752{
753 Lisp_Object fun = indirect_function (cmd); 753 Lisp_Object fun = indirect_function (cmd); /* Check cycles. */
754 Lisp_Object tmp; 754
755 755 if (NILP (fun) || EQ (fun, Qunbound))
756 if (SYMBOLP (cmd) 756 return Qnil;
757 /* Use an `interactive-form' property if present, analogous to the 757
758 function-documentation property. */ 758 /* Use an `interactive-form' property if present, analogous to the
759 && (tmp = Fget (cmd, intern ("interactive-form")), !NILP (tmp))) 759 function-documentation property. */
760 return tmp; 760 fun = cmd;
761 else if (SUBRP (fun)) 761 while (SYMBOLP (fun))
762 {
763 Lisp_Object tmp = Fget (fun, intern ("interactive-form"));
764 if (!NILP (tmp))
765 return tmp;
766 else
767 fun = Fsymbol_function (fun);
768 }
769
770 if (SUBRP (fun))
762 { 771 {
763 if (XSUBR (fun)->prompt) 772 if (XSUBR (fun)->prompt)
764 return list2 (Qinteractive, build_string (XSUBR (fun)->prompt)); 773 return list2 (Qinteractive, build_string (XSUBR (fun)->prompt));