Path: utzoo!attcan!uunet!snorkelwacker!apple!oliveb!orc!mipos3!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.emacs Subject: Re: Need read-number function Keywords: GNU EMACS Message-ID: <1990Feb8.193601.10581@iwarp.intel.com> Date: 8 Feb 90 19:36:01 GMT References: <4300068@m.cs.uiuc.edu> <1990Feb8.132524.1694@talos.uu.net> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 25 In-Reply-To: kjones@talos.uu.net (Kyle Jones) In article <1990Feb8.132524.1694@talos.uu.net>, kjones@talos (Kyle Jones) writes: | > I need a function read-number that would behave like (interactive "n"); | > that is, it would keep trying until a numeric value was typed. | [ Assuming GNU emacs here... ] | Yah, I had to code this one myself. I don't know if a function like | this should be standard in the distribution or not. Common Lisp's | elephantiasis is largely due to adopting functions from everyone's | toolbox. [code deleted] why not just: (defun rls-read-number () "read a number from the keyboard" (call-interactively (function (lambda (arg) (interactive "n") arg)))) Okay, so, it's cheating. :-) Just another GNU emacs hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/