GNU bug report logs - #69749
(bindat-type sint 32 t) -> unbound variable bitlen

Previous Next

Package: emacs;

Reported by: Eric Marsden <eric.marsden <at> risk-engineering.org>

Date: Tue, 12 Mar 2024 15:20:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 69749 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 69749 <at> debbugs.gnu.org, Eric Marsden <eric.marsden <at> risk-engineering.org>
Subject: Re: bug#69749: (bindat-type sint 32 t) -> unbound variable bitlen
Date: Wed, 13 Mar 2024 08:54:53 -0400
>> -- file bd.el
>> (require 'bindat)
>> (bindat-pack (bindat-type sint 32 t) 42)
>> -- 

When you open this file in Emacs≥28, the modeline will have an orange
"/d" which is meant to warn you that something's amiss.
Click on it, and your problem will be solved :-)

>> Symbol’s value as variable is void: bitlen
>>
>> This bug is difficult to understand. Run from an IELM buffer, this code 
>> works as expected. The macroexpansion of the bindat-type declaration 
>> includes a binding for bitlen.

Your code ends up (via the `sint` of `bindat-type`) relying on the
`lexical-binding` dialect of ELisp, which is enabled by default in
`ielm` but not in your file.


        Stefan





This bug report was last modified 1 year and 144 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.