unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Another lisp question
Date: Fri, 16 Apr 2010 10:58:22 -0700	[thread overview]
Message-ID: <4BC8A53E.8000509@gmail.com> (raw)
In-Reply-To: <4BC890FF.5080803@t-online.de>

On Friday 16 April 2010 09:31 AM, Klaus Jantzen wrote:
> Drew Adams wrote:
>> (defun mytest (n)
>> " Test"
>> ; (interactive "nEnter number: ")
>> (interactive (list (read-number "Enter number: ")))
>> (message "%d was entered" n))
>>
>> With both versions of the interactive statement I have the
>> same effect: the prompt comes back as long as I do not enter anything.
>>
>> I am running emacs22 on Debian lenny.
>> Do I need a special setting to achive what I want?
>>
>> You said you wanted to use the default value if the user hit Return
>> with typing
>> anything first. For that, use (read-number "Number: " MY-DEFAULT), as I
>> suggested before.
>>
>>
> OK; I did not really understand why you had that 42 in your code.
> It works.
> Thank you.

I believe its the answer to the ultimate question? ;)

-- 
Suvayu

Open source is the future. It sets us free.




      reply	other threads:[~2010-04-16 17:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-15 16:13 Another lisp question Klaus Jantzen
2010-04-15 16:51 ` Drew Adams
2010-04-16  9:40   ` Klaus Jantzen
2010-04-16 13:54     ` Drew Adams
2010-04-16 16:31       ` Klaus Jantzen
2010-04-16 17:58         ` Suvayu Ali [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BC8A53E.8000509@gmail.com \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).