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

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

bug#24750: 26.0.50; incorrect Edebug spec for cl-loop


From: Mark Oteiza
Subject: bug#24750: 26.0.50; incorrect Edebug spec for cl-loop
Date: Wed, 16 Nov 2016 15:08:35 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Gemini Lasswell <gazally@runbox.com> writes:

> The Edebug spec for cl-loop is incorrect, causing an error message when
> you try to instrument code that uses a cl-loop "using" clause. To
> reproduce, starting at the root of the Emacs source tree:
>
> 1. emacs -Q
> 2. C-x C-f lisp/registry.el RET
> 3. M-x edebug-all-defs RET
> 4. M-x eval-buffer RET
>
> Result: Bad ‘using’ clause
>
> The error happens during macro expansion of the cl-loop in
> registry-search, when it tries to parse a using clause that has
> had edebug-before and edebug-after added to it.
>
> I tried adding:
>
> ["using" (symbolp symbolp)]
>
> to the debug spec for cl-loop and that seemed to fix the problem.

That fixes the recipe here, but I am not terribly familiar with edebug
specs.

diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 2ebb824..210a208 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -923,6 +923,7 @@ cl-loop
                                "count" "maximize" "minimize" "if" "unless"
                                "return"]
                           form]
+                         ["using" (symbolp symbolp)]
                          ;; Simple default, which covers 99% of the cases.
                          symbolp form)))
   (if (not (memq t (mapcar #'symbolp





reply via email to

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