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: Tim X
Subject: Re: edebug and defun* &key
Date: Sat, 08 Jan 2011 10:04:54 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Tim X <timx@nospam.dev.null> writes:

> Le Wang <l26wang@gmail.com> writes:
>
>> Hi all,
>>
>>
>> I really like the clarity of defun* forms when specifying optional 
>> parameters.
>>  However, edebug doesn't seem to be able to unserstand these forms very well.
>>  Has anyone got a workaround?
>>
>> e.g.
>>
>> (defun* foo (&optional &key (arg t)))
>>
>> <M-x>edebug-defun
>
> The defun* is a CL compatibility macro and not a part of standard elisp.
> i.e. you have to load the 'cl package to get it. 
>
> Elisp can handle the &optional and &key parameter types in normal defun.
> IIRC the only real difference is that elisp cannot set default values
> for optional parameters - they are nil if not supplied and thats it. 
>
> When you say edebug does not understand these forms very well, what do
> you mean?
>
> Tim

Correcting myself - elisp doesn't have &key - a mistake I make all the
time because I'm often moving between elisp and cl and constantly get
some of this mixed up. Sorry for any confusion I caused.

Tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

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