From 8a6d230a995697e11813f59b8f3b72c6a6cf029c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C3=ABl=20Cadilhac?= Date: Mon, 10 Sep 2007 09:42:13 +0000 Subject: [PATCH] (Finteractive_form): If the interactive specification starts with a `(', use it as a Lisp form. --- src/ChangeLog | 3 +++ src/data.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 19854387b6a..cb8d66e14b4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,9 @@ * eval.c (Fcommandp): Change `->prompt' to `->intspec'. + * data.c (Finteractive_form): If the interactive specification starts + with a `(', use it as a Lisp form. + * callint.c (Fcall_interactively): Comment fixes. 2007-09-10 Stefan Monnier diff --git a/src/data.c b/src/data.c index 1f82f929281..dfc0c35705a 100644 --- a/src/data.c +++ b/src/data.c @@ -770,8 +770,11 @@ Value, if non-nil, is a list \(interactive SPEC). */) 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)) { -- 2.39.5