From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Edi Weitz Newsgroups: gmane.emacs.help Subject: Re: HOW TO GIVE A DEFAULT TO A TRULY INTERACTIVE FUNCTION Date: 17 Oct 2002 17:03:23 +0200 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <87k7khp0p0.fsf@bird.agharta.de> References: <8765w4yec8.fsf@bird.agharta.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034957501 22137 80.91.224.249 (18 Oct 2002 16:11:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2002 16:11:41 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 182Zip-0005jr-00 for ; Fri, 18 Oct 2002 18:11:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 182Zhm-0006Tf-00; Fri, 18 Oct 2002 12:10:30 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!trane.agharta.DE!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 36 Original-NNTP-Posting-Host: trane.agharta.de (62.159.208.82) Original-X-Trace: fu-berlin.de 1034867008 25243301 62.159.208.82 (16 [15706]) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: shelby.stanford.edu gnu.emacs.help:106147 comp.emacs:75321 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2681 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2681 gnuist006@hotmail.com (gnuist006) writes: > Edi Weitz 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.