[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: An elisp question
From: |
Joost Kremers |
Subject: |
Re: An elisp question |
Date: |
17 Sep 2008 21:05:00 GMT |
User-agent: |
slrn/0.9.8.1 (Linux) |
Oleksandr Gavenko wrote:
> In elisp.html (edition 2.8) on "20.6 Yes-or-No Queries" also there no
> special warning about use of "Yes-or-No".
the point is that Y-OR-N-P returns either t or nil, so you don't need to
explicitly compare it to T, you can just use it directly as the test for
IF. you wrote:
(if (equal (y-or-n-p "Yes or no? ") t)
...
but it's more concise to write:
(if (y-or-n-p "Yes or no? ")
...
(btw, if you want to test if a value is t, you can use eq, there's no need
to use equal.)
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
- An elisp question, Rodolfo Medina, 2008/09/16
- RE: An elisp question, Drew Adams, 2008/09/16
- Message not available
- Re: An elisp question, Joost Kremers, 2008/09/16
- RE: An elisp question, Drew Adams, 2008/09/16
- Message not available
- Re: An elisp question, Oleksandr Gavenko, 2008/09/17
- Re: An elisp question,
Joost Kremers <=
- Re: An elisp question, Bastien, 2008/09/18
- Re: An elisp question, Nikolaj Schumacher, 2008/09/19
- Message not available
- Re: An elisp question, Oleksandr Gavenko, 2008/09/19