The following code evaluates successfully using
eval-defun and runs as I would expect:
(require 'cl-lib) (defun my/sample-function () (let ((my-ht (make-hash-table))) (puthash :a 1 my-ht) (puthash :b 2 my-ht) (cl-loop for key being the hash-keys of my-ht using (hash-values value) do (prin1 (cons key value)))))
(my/sample-function) => (:a . 1)(:b . 2)nil
Debugger entered--Lisp error: (error "Bad ‘using’ clause") signal(error ("Bad ‘using’ clause")) error("Bad `using' clause") cl--parse-loop-clause() #[128 "\306\307\310\311\312\311\306\313!\"\"\">\204\314\312\315\3... macroexpand((cl-loop for key being the hash-keys of my-ht using (edebug-a... macroexp-macroexpand((cl-loop for key being the hash-keys of my-ht using ... macroexp--expand-all((cl-loop for key being the hash-keys of my-ht using ... ...
I imagine that edebug is choking during instrumentation on the hash-table -specific parts of the complex
cl-loop macro. This is the first time I've encountered this sort of problem with edebug.
I'm not certain that this is not the result of user-error though. In Common Lisp documentation the keywords appear singular with a different verb ordering (example source):
(loop for k being the hash-key using (hash-value v) of h do ...
However, the structure used within
my/sample-function above is the only form I have found to eval successfully.
I couldn't find anything relevant in debbugs.
emacs -Q version 25.1.1