[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `are-you-fine' function definition
From: |
Rodolfo Medina |
Subject: |
Re: `are-you-fine' function definition |
Date: |
Sat, 06 Sep 2008 17:27:10 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.50 (gnu/linux) |
Rodolfo Medina wrote:
>> now I need something like this: the function says:
>>
>> Are you fine today?
>>
>> . If I say `y', it says: `Oh, good.'; otherwise it says: `Why don't you
>> see a doctor?'
Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:
> (if (equal (read-string "Are you fine today? ") "y")
> (message "Oh, good.")
> (message "Why don't you see a doctor?"))
>
> You might want to change the (equal ...) test to one of these:
>
> (y-or-n-p "Are you fine today? ")
>
> (yes-or-no-p "Are you fine today? ")
>
> (let ((case-fold-search t))
> (string-match "\\`y\\(es\\)?\\'" (read-string "Are you fine today? ")))
Thanks, the `y-or-n-p' function is perfect for what I was looking for. But
now I wish to have something like `y-or-n-p' that asks me if I want right or
left ps footer, like this:
Right or left? (r/l)
. If I could access the `y-or-n-p' defun, then I could try to adapt it to an
`r-or-l-p' version, but can't find it anywhere. Please any suggestion?
Thanks
Rodolfo
- How to define a `multiple prompt' function?, Rodolfo Medina, 2008/09/02
- Re: How to define a `multiple prompt' function?, Barry Margolin, 2008/09/03
- 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 <=
- `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
- Re: ps-right-footer interactive setting, Rodolfo Medina, 2008/09/05
- Re: ps-right-footer interactive setting, Chetan, 2008/09/05
- Re: ps-right-footer interactive setting, Rodolfo Medina, 2008/09/06
- A `my-ps-print-setting' function (was: ps-print variables interactive setting), Rodolfo Medina, 2008/09/07
- Re: A `my-ps-print-setting' function, Andreas Politz, 2008/09/07
- defchoice macro (was: A `my-ps-print-setting' function), Rodolfo Medina, 2008/09/07