GNU bug report logs - #78813
feature/igc: [PATCH] Make the array face_attr_sym readonly

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Tue, 17 Jun 2025 08:50:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Helmut Eller <eller.helmut <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78813 <at> debbugs.gnu.org, pipcet <at> protonmail.com
Subject: bug#78813: feature/igc: [PATCH] Make the array face_attr_sym readonly
Date: Sun, 22 Jun 2025 20:25:44 +0200
On Sat, Jun 21 2025, Eli Zaretskii wrote:

>> From: Helmut Eller <eller.helmut <at> gmail.com>
>> Cc: Pip Cet <pipcet <at> protonmail.com>,  78813 <at> debbugs.gnu.org
>> Date: Fri, 20 Jun 2025 20:29:40 +0200
>> 
>> On Fri, Jun 20 2025, Eli Zaretskii wrote:
>> 
>> > Thanks, but I asked about this change on its own, not as part of some
>> > effort (which AFAIU is on the igc branch, not on master).  IOW,
>> > suppose we release Emacs 31 without the MPS support (something I hope
>> > will not need to happen, but just for the sake of this sub-thread):
>> > what would that change give us, considering the fact that this code
>> > was there since Emacs 21?
>> 
>> It would add some minor protection against accidental modifications of
>> the face_attr_sym array.
>
> How can it be accidentally modified?  It's a static array not exposed
> to Lisp.

I was thinking about accidental modification from C.

[...]
> Initialization using C initializers is used for simple values like
> scalars.  The LISP_INITIALLY stuff should be used only very sparingly
> and if strictly necessary, because it is very confusing at first
> sight.  So I'd very much prefer that we kept the current conventions
> for initializing complex variables, especially variables with Lisp
> values.

This doesn't make much sense to me.  But your project, your rules.

So you can close this bug.

Helmut




This bug report was last modified 25 days ago.

Previous Next


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