[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 73be4d1: Allow destructuring in &aux sections when using edebug (
From: |
Philipp Stephani |
Subject: |
master 73be4d1: Allow destructuring in &aux sections when using edebug (Bug#40431) |
Date: |
Wed, 10 Jun 2020 09:41:35 -0400 (EDT) |
branch: master
commit 73be4d1ed5b190bd93e9bad6aebe43d0dea0d7d3
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>
Allow destructuring in &aux sections when using edebug (Bug#40431)
* lisp/emacs-lisp/cl-macs.el (cl-lambda-list, cl-lambda-list1)
(cl-macro-list, cl-macro-list1): Allow arbitrary 'cl-lambda'
arguments in the &aux section.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-aux-edebug): New
regression test.
---
lisp/emacs-lisp/cl-macs.el | 8 ++++----
test/lisp/emacs-lisp/cl-macs-tests.el | 9 +++++++++
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 3317c58..45e814e 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -199,7 +199,7 @@ The name is made by appending a number to PREFIX, default
\"T\"."
[&optional ["&key" [cl-&key-arg &rest cl-&key-arg]
&optional "&allow-other-keys"]]
[&optional ["&aux" &rest
- &or (symbolp &optional def-form) symbolp]]
+ &or (cl-lambda-arg &optional def-form) cl-lambda-arg]]
. [&or arg nil])))
(def-edebug-spec cl-&optional-arg
@@ -219,7 +219,7 @@ The name is made by appending a number to PREFIX, default
\"T\"."
[&optional ["&key" cl-&key-arg &rest cl-&key-arg
&optional "&allow-other-keys"]]
[&optional ["&aux" &rest
- &or (symbolp &optional def-form) symbolp]]
+ &or (cl-lambda-arg &optional def-form) cl-lambda-arg]]
. [&or arg nil])))
(def-edebug-spec cl-type-spec sexp)
@@ -402,7 +402,7 @@ and BODY is implicitly surrounded by (cl-block NAME ...).
arg]]
&optional "&allow-other-keys"]]
[&optional ["&aux" &rest
- &or (symbolp &optional def-form) symbolp]]
+ &or (cl-lambda-arg &optional def-form) cl-lambda-arg]]
[&optional "&environment" arg]
)))
@@ -421,7 +421,7 @@ and BODY is implicitly surrounded by (cl-block NAME ...).
arg]]
&optional "&allow-other-keys"]]
[&optional ["&aux" &rest
- &or (symbolp &optional def-form) symbolp]]
+ &or (cl-lambda-arg &optional def-form) cl-lambda-arg]]
. [&or arg nil])))
;;;###autoload
diff --git a/test/lisp/emacs-lisp/cl-macs-tests.el
b/test/lisp/emacs-lisp/cl-macs-tests.el
index 24bbad0..29ae95e 100644
--- a/test/lisp/emacs-lisp/cl-macs-tests.el
+++ b/test/lisp/emacs-lisp/cl-macs-tests.el
@@ -601,4 +601,13 @@ collection clause."
collect y into result1
finally return (equal (nreverse result) result1))))
+(ert-deftest cl-macs-aux-edebug ()
+ "Check that Bug#40431 is fixed."
+ (with-temp-buffer
+ (prin1 '(cl-defun cl-macs-aux-edebug-test-fun (&aux ((a . b) '(1 . 2)))
+ (list a b))
+ (current-buffer))
+ ;; Just make sure the function can be instrumented.
+ (edebug-defun)))
+
;;; cl-macs-tests.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 73be4d1: Allow destructuring in &aux sections when using edebug (Bug#40431),
Philipp Stephani <=