From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: question about optional arguments Date: 08 Jan 2004 23:51:34 +0100 Organization: Organization?!? Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1073604370 23198 80.91.224.253 (8 Jan 2004 23:26:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2004 23:26:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 09 00:26:05 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AejXR-0000jM-00 for ; Fri, 09 Jan 2004 00:26:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Aek6h-00057l-Lw for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Jan 2004 19:02:31 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!p3ee20cb0.dip.t-dialin.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: p3ee20cb0.dip.t-dialin.net (62.226.12.176) Original-X-Trace: news.uni-berlin.de 1073602294 8922585 62.226.12.176 ([198409]) X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Xref: shelby.stanford.edu gnu.emacs.help:119897 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15830 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15830 "leo" writes: > "David Kastrup" wrote in message > news:x57k03c5rm.fsf@lola.goethe.zz... > > "leo" writes: > > > > > i want to call dired-get-marked-files with the specific value 1 for > > > secend argument arg but without a value for the first argument localp, > > > > Is that a trick question? > > no, probably just a stupid question, sorry. > > > (dired-get-marked-files nil 1) > > thanks david, i didn't know that nil is as good as no argument. Then it would not have done harm to look up argument lists in the manual: A call to the function requires one actual argument for each of the REQUIRED-VARS. There may be actual arguments for zero or more of the OPTIONAL-VARS, and there cannot be any actual arguments beyond that unless the lambda list uses `&rest'. In that case, there may be any number of extra actual arguments. If actual arguments for the optional and rest variables are omitted, then they always default to `nil'. There is no way for the function to distinguish between an explicit argument of `nil' and an omitted argument. However, the body of the function is free to consider `nil' an abbreviation for some other meaningful value. This is what `substring' does; `nil' as the third argument to `substring' means to use the length of the string supplied. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum