help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Handling nil values in optional argument


From: Michael Heerdegen
Subject: Re: [External] : Handling nil values in optional argument
Date: Fri, 12 Jul 2024 06:37:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Drew Adams <drew.adams@oracle.com> writes:

> Instead, your code can use something other than nil for the value that
> you pass as an explicit argument.  It can use the singleton list
> (nil), for example.

Alternatively one can give the defun an &rest argument list and look at
the length of the specified list in the body.  The argument variables
would have to be assigned in the body.  Use an advertised calling
convention to get argument name support back for eldoc etc.

I guess that's more or less what's cl-defun also does.  So one can also
use cl-defun.  Or just do as Drew said.


Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]