From: "Drew Adams" <drew.adams@oracle.com>
To: "'Klaus Jantzen'" <k.d.jantzen@t-online.de>,
"'emacs-list'" <help-gnu-emacs@gnu.org>
Subject: RE: Another lisp question
Date: Thu, 15 Apr 2010 09:51:37 -0700 [thread overview]
Message-ID: <BD8383FD690A40CCAA2B42A2E5E55C3E@us.oracle.com> (raw)
In-Reply-To: <4BC73B26.6050005@t-online.de>
> (interactive "sEnter number: ")
Consider using `read-number':
(interactive (list (read-number "Number: " 42)))
> When hitting <Enter> without entering anything, emacs comes
> back to the input request. How can I find out, that nothing
> has been entered so that I can use e.g. a default value?
I don't understand how that happens to you.
It should just return the empty string, "".
M-: (defun foo (arg) (interactive "sNum: ") (message "%S" arg))
M-x foo RET RET
That returns "" for me.
next prev parent reply other threads:[~2010-04-15 16:51 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 [this message]
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
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=BD8383FD690A40CCAA2B42A2E5E55C3E@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=k.d.jantzen@t-online.de \
/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).