From: Stefan Monnier Date: Fri, 15 Mar 2024 16:45:09 +0000 (-0400) Subject: * lisp/emacs-lisp/bindat.el (sint): Burp in dynbind (bug#69749) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=27453e15c2f421506da2d89cea979b605be110ec;p=emacs.git * lisp/emacs-lisp/bindat.el (sint): Burp in dynbind (bug#69749) (cherry picked from commit 7231a89524f280c51278c3c74c6ae2215a307f0f) --- 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)))