summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-02-12 22:53:38 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-02-12 22:53:38 -0500
commitca0842347e5437bcaeeded4a7fd55e0e48ed4bad (patch)
tree7d9719864ae41a9a6f31e53ac4dfd8fa2a7e1416 /test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
parent626911b704b3f144e9b8dbd187c394ed90e8411c (diff)
downloademacs-ca0842347e5437bcaeeded4a7fd55e0e48ed4bad.tar.gz
emacs-ca0842347e5437bcaeeded4a7fd55e0e48ed4bad.tar.bz2
emacs-ca0842347e5437bcaeeded4a7fd55e0e48ed4bad.zip
Edebug: Make it possible to debug `gv-expander`s in `declare`
Arrange for declarations to be able to specify their own specs via the `edebug-declaration-spec` property. * lisp/emacs-lisp/edebug.el: (edebug--get-declare-spec): New function. (def-declarations): New spec element. (defun, defmacro): Use it in their spec. * lisp/emacs-lisp/gv.el (gv-expander, gv-setter): Set `edebug-declaration-spec`. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-gv-expander): New test. * test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el (edebug-test-code-use-gv-expander): New test case.
Diffstat (limited to 'test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el')
-rw-r--r--test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el b/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
index d77df3c3c51..835d3781d09 100644
--- a/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
+++ b/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
@@ -147,5 +147,11 @@
;; of the same name.
(message "Hi %s" (gate 7))))
+(defun edebug-test-code-use-gv-expander (x)
+ (declare (gv-expander
+ (lambda (do)
+ (funcall do `(car ,x) (lambda (v) `(setcar ,x ,v))))))
+ (car x))
+
(provide 'edebug-test-code)
;;; edebug-test-code.el ends here