From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: Elisp: Simple function to Add Two Numbers Date: Sun, 27 Aug 2006 23:55:40 +0200 Organization: Informatimago Message-ID: <87k64tsv1f.fsf@thalassa.informatimago.com> References: <87u03xhmvy.fsf@mail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1156718470 9428 80.91.229.2 (27 Aug 2006 22:41:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 27 Aug 2006 22:41:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 28 00:41:06 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GHTJR-0003f0-MY for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Aug 2006 00:41:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHTJR-0005yl-79 for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Aug 2006 18:41:05 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-X-Trace: individual.net peTuH/pVbL4Je3bYfR2OtwWurhIIuMQ6LdMlqkEY/boflS7aCF Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:WI2KUWRitOuIIHjOCMErofP8IQY= Original-Xref: shelby.stanford.edu gnu.emacs.help:141351 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36972 Archived-At: Hadron Quark writes: > Edward Dodge writes: > >> Please, >> >> Why do I get "wrong number of arguments" every time I try to run this simple, >> straight-forward code? >> >> (defun ekd-average (jabba wabba) >> "Adds two numbers and returns the sum." >> (interactive "nFirstvar: \nn Secondvar: \nr") >> ( + jabba wabba)) >> > > As a fellow beginner I would say its because you havent properly > specified your second argument string in the interactive > statement. Check whitespace. The whitespaces don't matter, as long as they're not just after a newline. The problem is that there are two newlines with three characters specifying a total of four interactive arguments: n, n and r. (r gives two arguments, start and end of region). -- __Pascal Bourguignon__ http://www.informatimago.com/ READ THIS BEFORE OPENING PACKAGE: According to certain suggested versions of the Grand Unified Theory, the primary particles constituting this product may decay to nothingness within the next four hundred million years.