From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: gnuist006@hotmail.com (gnuist006) Newsgroups: gmane.emacs.help Subject: Re: HOW TO GIVE A DEFAULT TO A TRULY INTERACTIVE FUNCTION Date: 17 Oct 2002 07:35:35 -0700 Organization: http://groups.google.com/ Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <8765w4yec8.fsf@bird.agharta.de> NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1034973668 3928 80.91.224.249 (18 Oct 2002 20:41:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2002 20:41:08 +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 182dvc-00010z-00 for ; Fri, 18 Oct 2002 22:41:05 +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 182ZhY-0006Rc-00; Fri, 18 Oct 2002 12:10:16 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 21 Original-NNTP-Posting-Host: 209.179.38.68 Original-X-Trace: posting.google.com 1034865335 18071 127.0.0.1 (17 Oct 2002 14:35:35 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 17 Oct 2002 14:35:35 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:106146 comp.emacs:75319 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:2713 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2713 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.