bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58513: describe-function should say that defconst variables are cons


From: Stefan Monnier
Subject: bug#58513: describe-function should say that defconst variables are constant
Date: Sat, 15 Oct 2022 10:11:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Kangas [2022-10-15 12:33:29] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> The byte-compiler already does warn about it, but only if the assignment
>> is in the same file as the `defconst`.
> I don't get any warnings with this recipe:
>
>     echo "(defconst foo-bar t) (setq foo-bar nil)" > /tmp/foo.el
>     emacs -Q -batch -eval '(byte-compile-file "/tmp/foo.el")'
>
> Am I missing something?

Hmm... I don't get a warning either.  And looking at `bytecomp.el` I see
that we push stuff to `byte-compile-const-variables` but we never look
stuff up in it :-(

I'm pretty sure I wrote some code to use that variable (apparently
around 2003), but apparently it got lost in subsequent changes, probably
when we introduced lexical-binding.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]