diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-03-29 13:58:30 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-03-29 13:58:30 +0000 |
commit | cc515226efa8cc9c7827bf3edb940325ee2b13ec (patch) | |
tree | d45d6ba8e7f1f4b920d75b2b28026e6982e4e964 /src/data.c | |
parent | 8b2375e77fc7d1828448938ece6853214b69d61e (diff) | |
download | emacs-cc515226efa8cc9c7827bf3edb940325ee2b13ec.tar.gz |
(Fsubr_interactive_form): New function.
(syms_of_data): Defsubr it.
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/data.c b/src/data.c index b635cb5619b..f84ee1b03ca 100644 --- a/src/data.c +++ b/src/data.c @@ -731,6 +731,20 @@ function with `&rest' args, or `unevalled' for a special form.") 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 @@ syms_of_data () staticpro (&Qbool_vector); staticpro (&Qhash_table); + defsubr (&Ssubr_interactive_form); defsubr (&Seq); defsubr (&Snull); defsubr (&Stype_of); |