diff src/data.c @ 84438:48251c264d8d

(Finteractive_form): If the interactive specification starts with a `(', use it as a Lisp form.
author Michaël Cadilhac <michael.cadilhac@lrde.org>
date Mon, 10 Sep 2007 09:41:44 +0000
parents 65663fcd2caa
children 3fd2159a6a89 bdb3fe0ba9fa
line wrap: on
line diff
--- a/src/data.c	Mon Sep 10 09:41:13 2007 +0000
+++ b/src/data.c	Mon Sep 10 09:41:44 2007 +0000
@@ -770,8 +770,11 @@
 
   if (SUBRP (fun))
     {
-      if (XSUBR (fun)->prompt)
-	return list2 (Qinteractive, build_string (XSUBR (fun)->prompt));
+      char *spec = XSUBR (fun)->intspec;
+      if (spec)
+	return list2 (Qinteractive,
+		      (*spec != '(') ? build_string (spec) :
+		      Fcar (Fread_from_string (build_string (spec), Qnil, Qnil)));
     }
   else if (COMPILEDP (fun))
     {