Path: utzoo!attcan!uunet!husc6!yale!Ram-Ashwin
From: Ram-Ashwin@cs.yale.edu (Ashwin Ram)
Newsgroups: comp.emacs
Subject: Re: does concat really return a string
Message-ID: <28888@yale-celray.yale.UUCP>
Date: 11 May 88 19:33:10 GMT
References: <324@ho7cad.ATT.COM>
Sender: root@yale.UUCP
Reply-To: Ram-Ashwin@cs.yale.edu (Ashwin Ram)
Organization: Computer Science, Yale University, New Haven, CT 06520-2158
Lines: 29
In-reply-to: msb@ho5cad.ATT.COM

In article <324@ho7cad.ATT.COM>, msb@ho5cad writes:
> I am trying to 'concat' a string to be ised in 'interactive' so that a
> default string shows up in the 'interactive' string.  As a test case,
> I have the following sections of code.  Doesn't seem that the return
> value of 'concat' can be fed to 'interactive'.

No.  If you read the documentation of 'interactive' you'll see why:

        If the argument is not a string, it is evaluated to get a list of
         arguments to pass to the function.

In your second example below:

> ;;;   (interactive "*cgimme a character")
> ;;;   (interactive (concat "*cgimme " "a " "character"))

the concat is supposed to return a list of arguments for the function (as
opposed to a string containing an interactive parsing specification).  You might
try something like:

        (interactive (list (read-char)))

enhanced with a prompt if you like.

-- Ashwin.

ARPA:    Ram-Ashwin@cs.yale.edu
UUCP:    {decvax,ucbvax,harvard,cmcl2,...}!yale!Ram-Ashwin
BITNET:  Ram@yalecs