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

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

Re: edebug-syntax-error when instrumenting working cl-defun


From: Thorsten Jolitz
Subject: Re: edebug-syntax-error when instrumenting working cl-defun
Date: Sat, 16 Aug 2014 13:18:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Thorsten Jolitz <address@hidden> 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




reply via email to

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