unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: edebug and defun* &key
Date: Sat, 08 Jan 2011 10:04:54 +1100	[thread overview]
Message-ID: <87d3o89uy1.fsf@puma.rapttech.com.au> (raw)
In-Reply-To: 87hbdk9v8r.fsf@puma.rapttech.com.au

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	other threads:[~2011-01-07 23:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5.1294410734.3795.help-gnu-emacs@gnu.org>
2011-01-07 22:58 ` edebug and defun* &key Tim X
2011-01-07 23:04   ` Tim X [this message]
2011-01-07 14:32 Le Wang
2011-01-07 14:44 ` Tassilo Horn
2011-01-07 18:54   ` Le Wang
     [not found] ` <mailman.6.1294411469.3795.help-gnu-emacs@gnu.org>
2011-01-08 19:25   ` Raffaele Ricciardi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d3o89uy1.fsf@puma.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).