[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to define a `multiple prompt' function?
From: |
Barry Margolin |
Subject: |
Re: How to define a `multiple prompt' function? |
Date: |
Wed, 03 Sep 2008 00:08:19 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <87ej42m64o.fsf@gmail.com>,
Rodolfo Medina <rodolfo.medina@gmail.com> wrote:
> I wish to define a function that prompts me more than once: let's call it
> `my-function': when I type `M-x my-function', in the echo area I see (just an
> example):
>
> Hi, how are you today?
>
> . Then I type, e.g., `fine RET', and again it prompts me with:
>
> I see. And, what did you do yesterday?
>
> ... and so on. Then I'm going to put some `if... else' conditions over my
> possible answers. Can anybody please provide some hints about how to elisp
> this?
>
> Thanks for any help
> Rodolfo
(defun my-function ()
(interactive)
(let* ((response (read-from-minibuffer "Hi, how are you today? "))
(new-prompt (format "I see, you're %s? And where did you go
yesterday?" response))
(response2 (read-from-minibuffer new-prompt)))
(message "I hope you enjoyed %s" response2)))
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
- How to define a `multiple prompt' function?, Rodolfo Medina, 2008/09/02
- Re: How to define a `multiple prompt' function?,
Barry Margolin <=
- ps-print variables interactive setting (was: How to define a `multiple prompt' function?), Rodolfo Medina, 2008/09/03
- Re: ps-print variables interactive setting, Lennart Borgman (gmail), 2008/09/03
- Re: ps-print variables interactive setting, Andreas Politz, 2008/09/03
- `are-you-fine' function definition (was: ps-print variables interactive setting), Rodolfo Medina, 2008/09/04
- Re: `are-you-fine' function definition, Kevin Rodgers, 2008/09/04
- Message not available
- Re: `are-you-fine' function definition, Rodolfo Medina, 2008/09/06
- `y-or-n-p' function definition (was: `are-you-fine' function definition), Rodolfo Medina, 2008/09/06
- Re: `y-or-n-p' function definition, Nikolaj Schumacher, 2008/09/08
- ps-right-footer interactive setting (was: ps-print variables interactive setting), Rodolfo Medina, 2008/09/04
- Re: ps-right-footer interactive setting (was: ps-print variables interactive setting), Barry Margolin, 2008/09/04