diff options
| author | Alan Mackenzie | 2019-09-24 17:04:12 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2019-09-24 17:06:20 +0000 |
| commit | ef0fc0bed1c97a1c803fa83bee438ca9cfd238b0 (patch) | |
| tree | bc97c718d5724058d161475e6856a241e5fdf964 | |
| parent | 9a82195cfcafd3003fc971b71ab401b37ecc0930 (diff) | |
| download | emacs-ef0fc0bed1c97a1c803fa83bee438ca9cfd238b0.tar.gz emacs-ef0fc0bed1c97a1c803fa83bee438ca9cfd238b0.zip | |
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.
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index c898da3d39f..717026995a3 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'." | |||
| 2165 | ;; but only at the top level inside unquotes. | 2165 | ;; but only at the top level inside unquotes. |
| 2166 | (def-edebug-spec backquote-form | 2166 | (def-edebug-spec backquote-form |
| 2167 | (&or | 2167 | (&or |
| 2168 | ;; Disallow instrumentation of , and ,@ inside a nested backquote, since | ||
| 2169 | ;; these are likely to be forms generated by a macro being debugged. | ||
| 2170 | ("`" nested-backquote-form) | ||
| 2168 | ([&or "," ",@"] &or ("quote" backquote-form) form) | 2171 | ([&or "," ",@"] &or ("quote" backquote-form) form) |
| 2169 | ;; The simple version: | 2172 | ;; The simple version: |
| 2170 | ;; (backquote-form &rest backquote-form) | 2173 | ;; (backquote-form &rest backquote-form) |
| @@ -2180,6 +2183,16 @@ into `edebug--cl-macrolet-defs' which is checked in `edebug-list-form-args'." | |||
| 2180 | (vector &rest backquote-form) | 2183 | (vector &rest backquote-form) |
| 2181 | sexp)) | 2184 | sexp)) |
| 2182 | 2185 | ||
| 2186 | (def-edebug-spec nested-backquote-form | ||
| 2187 | (&or | ||
| 2188 | ;; Allow instrumentation of any , or ,@ contained within the (\, ...) or | ||
| 2189 | ;; (\,@ ...) matched on the next line. | ||
| 2190 | ([&or "," ",@"] backquote-form) | ||
| 2191 | (nested-backquote-form [&rest [¬ "," ",@"] nested-backquote-form] | ||
| 2192 | . [&or nil nested-backquote-form]) | ||
| 2193 | (vector &rest nested-backquote-form) | ||
| 2194 | sexp)) | ||
| 2195 | |||
| 2183 | ;; Special version of backquote that instruments backquoted forms | 2196 | ;; Special version of backquote that instruments backquoted forms |
| 2184 | ;; destined to be evaluated, usually as the result of a | 2197 | ;; destined to be evaluated, usually as the result of a |
| 2185 | ;; macroexpansion. Backquoted code can only have unquotes (, and ,@) | 2198 | ;; macroexpansion. Backquoted code can only have unquotes (, and ,@) |