unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Klaus Jantzen <k.d.jantzen@t-online.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: 'emacs-list' <help-gnu-emacs@gnu.org>
Subject: Re: Another lisp question
Date: Fri, 16 Apr 2010 18:31:59 +0200	[thread overview]
Message-ID: <4BC890FF.5080803@t-online.de> (raw)
In-Reply-To: <114E1EEC06534A028C516D3AB5689E40@us.oracle.com>

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.
-- 

K.D.J.





  reply	other threads:[~2010-04-16 16:31 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 [this message]
2010-04-16 17:58         ` Suvayu Ali

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=4BC890FF.5080803@t-online.de \
    --to=k.d.jantzen@t-online.de \
    --cc=drew.adams@oracle.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).