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

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

Re: edebug and defun* &key


From: Raffaele Ricciardi
Subject: Re: edebug and defun* &key
Date: Sat, 8 Jan 2011 11:25:12 -0800 (PST)
User-agent: G2/1.0

On Jan 7, 3:44 pm, Tassilo Horn <tass...@member.fsf.org> wrote:
> Le Wang <l26w...@gmail.com> writes:
>
> Hi!
>
> > I really like the clarity of defun* forms when specifying optional
> > parameters.
>
> > (defun* foo (&optional &key (arg t)))
>
> I don't know about edebug and defun*, but for optional parameters, you
> don't need defun*.
>
>   (defun foo (&optional baz bla))
>
> is perfectly valid standard elisp.  For &key, you need defun*.  But
> keyword parameters are optional anyway, so your above definition should
> read like
>
>   (defun* foo (&key (arg t)))
>
> Bye,
> Tassilo

Moreover, you shouldn't be mixing &optional and &key:

http://gigamonkeys.com/book/functions.html

Read paragraph "Mixing Different Parameter Types".



reply via email to

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