diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-02-15 21:25:15 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-02-15 21:25:15 -0500 |
commit | 83d9fbe3bb8ffdf9e4719842e2510a8dbde86f78 (patch) | |
tree | 4c306877a64e744a9a6d466d76e0f4cfd28e2ab3 /test/lisp/emacs-lisp/bindat-tests.el | |
parent | 2106b12fa751094d1b754b50e6dcad2a19e8f02a (diff) | |
download | emacs-83d9fbe3bb8ffdf9e4719842e2510a8dbde86f78.tar.gz emacs-83d9fbe3bb8ffdf9e4719842e2510a8dbde86f78.tar.bz2 emacs-83d9fbe3bb8ffdf9e4719842e2510a8dbde86f78.zip |
* lisp/emacs-lisp/bindat.el (bindat-spec): New macro.
It's basically an alias for `quote`, but it offers the advantage of
providing Edebug support and opens the possibility of compiling
the bindat spec to ELisp code.
* doc/lispref/processes.texi (Bindat Spec): Document `bindat-spec`.
(Bindat Functions): Tweak a few things to adjust to the state of the code.
* test/lisp/emacs-lisp/bindat-tests.el: Use it.
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests--read): New function.
(edebug-tests--&rest-behavior): New test.
Diffstat (limited to 'test/lisp/emacs-lisp/bindat-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/bindat-tests.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/lisp/emacs-lisp/bindat-tests.el b/test/lisp/emacs-lisp/bindat-tests.el index a9a881987c0..72883fc2ec7 100644 --- a/test/lisp/emacs-lisp/bindat-tests.el +++ b/test/lisp/emacs-lisp/bindat-tests.el @@ -24,13 +24,15 @@ (require 'cl-lib) (defvar header-bindat-spec - '((dest-ip ip) + (bindat-spec + (dest-ip ip) (src-ip ip) (dest-port u16) (src-port u16))) (defvar data-bindat-spec - '((type u8) + (bindat-spec + (type u8) (opcode u8) (length u16r) ;; little endian order (id strz 8) @@ -38,7 +40,8 @@ (align 4))) (defvar packet-bindat-spec - '((header struct header-bindat-spec) + (bindat-spec + (header struct header-bindat-spec) (items u8) (fill 3) (item repeat (items) |