[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ef0fc0b: New edebug-spec, nested-backquote-form. T
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] master ef0fc0b: New edebug-spec, nested-backquote-form. This fixes bug #31090 |
Date: |
Tue, 24 Sep 2019 13:06:50 -0400 (EDT) |
branch: master
commit ef0fc0bed1c97a1c803fa83bee438ca9cfd238b0
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>
New edebug-spec, nested-backquote-form. This fixes bug #31090
* lisp/emacs-lisp/edebug.el: (nested-backquote-form): a new edebug-spec
which
handles nested backquote structures without a , or ,@ "between" the outer
and
inner backquotes.
(backquote-form): Use nested-backquote-form.
---
lisp/emacs-lisp/edebug.el | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index c898da3..7170269 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -2165,6 +2165,9 @@ into `edebug--cl-macrolet-defs' which is checked in
`edebug-list-form-args'."
;; but only at the top level inside unquotes.
(def-edebug-spec backquote-form
(&or
+ ;; Disallow instrumentation of , and ,@ inside a nested backquote, since
+ ;; these are likely to be forms generated by a macro being debugged.
+ ("`" nested-backquote-form)
([&or "," ",@"] &or ("quote" backquote-form) form)
;; The simple version:
;; (backquote-form &rest backquote-form)
@@ -2180,6 +2183,16 @@ into `edebug--cl-macrolet-defs' which is checked in
`edebug-list-form-args'."
(vector &rest backquote-form)
sexp))
+(def-edebug-spec nested-backquote-form
+ (&or
+ ;; Allow instrumentation of any , or ,@ contained within the (\, ...) or
+ ;; (\,@ ...) matched on the next line.
+ ([&or "," ",@"] backquote-form)
+ (nested-backquote-form [&rest [¬ "," ",@"] nested-backquote-form]
+ . [&or nil nested-backquote-form])
+ (vector &rest nested-backquote-form)
+ sexp))
+
;; Special version of backquote that instruments backquoted forms
;; destined to be evaluated, usually as the result of a
;; macroexpansion. Backquoted code can only have unquotes (, and ,@)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master ef0fc0b: New edebug-spec, nested-backquote-form. This fixes bug #31090,
Alan Mackenzie <=