From: Thorsten Jolitz <tjolitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: edebug-syntax-error when instrumenting working cl-defun
Date: Sat, 16 Aug 2014 13:18:01 +0200 [thread overview]
Message-ID: <87k368u1hy.fsf@gmail.com> (raw)
In-Reply-To: 87oavku2zz.fsf@gmail.com
Thorsten Jolitz <tjolitz@gmail.com> writes:
> this function can be evaluated and seems to work:
>
> #+begin_src emacs-lisp
> (defun* foo (x &optional y &rest args &allow-other-keys)
> (list x y args))
> #+end_src
>
> #+results:
> : foo
>
> #+begin_src emacs-lisp :results raw
> (foo 1 2 :key1 'val1 :key2 'val2)
> #+end_src
>
> #+results:
> (1 2 (:key1 val1 :key2 val2))
>
>
> but when trying to instrument it for edebug with C-u C-M-x I get this
> error:
>
> ,----
> | edebug-syntax-error: Invalid read syntax: "Failed matching", ([&rest
> | arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
> | [&optional ["&rest" arg]] [&optional ["&key" [cl-&key-arg &rest
> | cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest
> | &or (symbolp &optional def-form) symbolp]])
> `----
>
> Where is the bug here - in my function definition, in cl-defun or in
> edebug?
Ok, I think I found it myself: the &allow-other-keys is unnecessary here
and expects the presence of :key args in the signature.
--
cheers,
Thorsten
prev parent reply other threads:[~2014-08-16 11:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-16 10:45 edebug-syntax-error when instrumenting working cl-defun Thorsten Jolitz
2014-08-16 11:18 ` Thorsten Jolitz [this message]
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=87k368u1hy.fsf@gmail.com \
--to=tjolitz@gmail.com \
--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).