diff src/data.c @ 209:41ff10fd062f r20-4b3

Import from CVS: tag r20-4b3
author cvs
date Mon, 13 Aug 2007 10:04:58 +0200
parents e45d5e7c476e
children 78478c60bfcd
line wrap: on
line diff
--- a/src/data.c	Mon Aug 13 10:03:54 2007 +0200
+++ b/src/data.c	Mon Aug 13 10:04:58 2007 +0200
@@ -382,6 +382,19 @@
     return make_int (nargs);
 }
 
+DEFUN ("subr-interactive", Fsubr_interactive, 1, 1, 0, /*
+Return the interactive spec of the subr object, or nil.
+If non-nil, the return value will be a list whose first element is
+`interactive' and whose second element is the interactive spec.
+*/
+       (subr))
+{
+  CONST char *prompt;
+  CHECK_SUBR (subr);
+  prompt = XSUBR (subr)->prompt;
+  return prompt ? list2 (Qinteractive, build_string (prompt)) : Qnil;
+}
+
 DEFUN ("compiled-function-p", Fcompiled_function_p, 1, 1, 0, /*
 t if OBJECT is a byte-compiled function object.
 */
@@ -2303,6 +2316,7 @@
   DEFSUBR (Fsubrp);
   DEFSUBR (Fsubr_min_args);
   DEFSUBR (Fsubr_max_args);
+  DEFSUBR (Fsubr_interactive);
   DEFSUBR (Fcompiled_function_p);
   DEFSUBR (Ftype_of);
   DEFSUBR (Fcar);