GNU bug report logs - #58513
describe-function should say that defconst variables are constant

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Fri, 14 Oct 2022 12:05:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: Stefan Kangas <stefankangas <at> gmail.com>, 58513 <at> debbugs.gnu.org
Subject: bug#58513: describe-function should say that defconst variables are constant
Date: Fri, 14 Oct 2022 14:40:27 +0200
Phil Sainty <psainty <at> orcon.net.nz> writes:

> It does at least one thing different: if you load or eval a defconst
> for a variable which already exists, the value is updated.

Yes, that's true.

And we could start adding a symbol property saying that a constant is
meant to be constant, and perhaps start warning if people change it, but
that would make things slower for basic things like `setq', so I'm
pretty sure it's not worth it.

We could use that property to make describe-function say that the
variable isn't meant to be changed, though.  But is it worth adding to
the symbol plist just for that?  Hm...




This bug report was last modified 2 years and 242 days ago.

Previous Next


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