From: Edi Weitz <edi@agharta.de>
Subject: Re: HOW TO GIVE A DEFAULT TO A TRULY INTERACTIVE FUNCTION
Date: 17 Oct 2002 17:03:23 +0200 [thread overview]
Message-ID: <87k7khp0p0.fsf@bird.agharta.de> (raw)
In-Reply-To: b00bb831.0210170635.6dbe06f5@posting.google.com
gnuist006@hotmail.com (gnuist006) writes:
> Edi Weitz <edi@agharta.de> wrote in message
>
> > (require 'cl)
> >
> > (defun* bar (&optional (default 5))
> > (let* ((default-string (format "%s" default))
> > (string (read-string "Number: "
> > default-string
> > nil
> > default-string)))
> > ;; needs check for wrong input
> > (list (string-to-number string))))
> >
> > (defun foo (n)
> > (interactive
> > (bar 42))
> > (insert (format "%s" (* 3 n))))
>
> Pathetic solution. breaks one, fixes noone.
> It just accepted "u" as the input and did not do number
> validation.
Looks like I was right in my first posting: You obviously are a troll.
You didn't say anything about number validation and your icky little
"I look like a C program" Elisp demo didn't do that either. If you
could read you could have seen that there's a comment with respect to
validation in my code. Should be easy to add for every non-idiot.
But count me out on providing further free help to you. The next time
someone posts a solution you'll complain that it doesn't help you with
your tax declaration.
Edi.
next prev parent reply other threads:[~2002-10-17 15:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-14 16:02 HOW TO GIVE A DEFAULT TO A TRULY INTERACTIVE FUNCTION gnuist006
2002-10-14 17:22 ` Joe Casadonte
2002-10-14 20:07 ` Edi Weitz
2002-10-17 14:27 ` gnuist006
2002-10-17 17:35 ` Barry Margolin
2002-10-18 10:36 ` Oliver Scholz
2002-10-17 14:35 ` gnuist006
2002-10-17 15:03 ` Edi Weitz [this message]
2002-10-18 5:51 ` huntingdon
2002-10-18 7:13 ` Friedrich Dominicus
2002-10-18 7:07 ` Friedrich Dominicus
2002-10-18 8:05 ` Friedrich Dominicus
2002-10-18 17:05 ` Kevin Rodgers
-- strict thread matches above, loose matches on Subject: below --
2002-10-14 18:27 Bingham, Jay
[not found] <mailman.1034620095.15632.help-gnu-emacs@gnu.org>
2002-10-17 14:22 ` gnuist006
2002-10-18 7:14 ` Friedrich Dominicus
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=87k7khp0p0.fsf@bird.agharta.de \
--to=edi@agharta.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).