# HG changeset patch # User Gerd Moellmann # Date 985874310 0 # Node ID 1a420f3df4f88fb664739c5d60b8dd09c1a5d3a7 # Parent 9131cdd6fa7fc5b38b847c09ddea2a2b3eb8f7d1 (Fsubr_interactive_form): New function. (syms_of_data): Defsubr it. diff -r 9131cdd6fa7f -r 1a420f3df4f8 src/data.c --- a/src/data.c Thu Mar 29 11:51:26 2001 +0000 +++ b/src/data.c Thu Mar 29 13:58:30 2001 +0000 @@ -731,6 +731,20 @@ return Fcons (make_number (minargs), make_number (maxargs)); } +DEFUN ("subr-interactive-form", Fsubr_interactive_form, Ssubr_interactive_form, 1, 1, 0, + "Return the interactive form of SUBR or nil if none.\n\ +SUBR must be a built-in function. Value, if non-nil, is a list\n\ +\(interactive SPEC).") + (subr) + Lisp_Object subr; +{ + if (!SUBRP (subr)) + wrong_type_argument (Qsubrp, subr); + if (XSUBR (subr)->prompt) + return list2 (Qinteractive, build_string (XSUBR (subr)->prompt)); + return Qnil; +} + /* Getting and setting values of symbols */ @@ -3000,6 +3014,7 @@ staticpro (&Qbool_vector); staticpro (&Qhash_table); + defsubr (&Ssubr_interactive_form); defsubr (&Seq); defsubr (&Snull); defsubr (&Stype_of);