summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2024-03-15 12:45:09 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2024-03-15 12:45:09 -0400
commit7231a89524f280c51278c3c74c6ae2215a307f0f (patch)
treedec71516c0c856e38fd12a71517f942e72ba6aae /lisp/emacs-lisp
parent005536285585bcdf5a67a01cdfd8e1242742f953 (diff)
downloademacs-7231a89524f280c51278c3c74c6ae2215a307f0f.tar.gz
emacs-7231a89524f280c51278c3c74c6ae2215a307f0f.tar.bz2
emacs-7231a89524f280c51278c3c74c6ae2215a307f0f.zip
* lisp/emacs-lisp/bindat.el (sint): Burp in dynbind (bug#69749)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bindat.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el
index ef0ec688dbd..42ba89ba2c1 100644
--- a/lisp/emacs-lisp/bindat.el
+++ b/lisp/emacs-lisp/bindat.el
@@ -944,9 +944,13 @@ a bindat type expression."
(bindat-defmacro sint (bitlen le)
"Signed integer of size BITLEN.
Big-endian if LE is nil and little-endian if not."
+ (unless lexical-binding
+ (error "The `sint' type requires 'lexical-binding'"))
(let ((bl (make-symbol "bitlen"))
(max (make-symbol "max"))
(wrap (make-symbol "wrap")))
+ ;; FIXME: This `let*' around the `struct' results in code which the
+ ;; byte-compiler does not handle efficiently. 🙁
`(let* ((,bl ,bitlen)
(,max (ash 1 (1- ,bl)))
(,wrap (+ ,max ,max)))