GNU bug report logs - #75521
scratch/igc: Delete unused macro DEFVAR_LISP_NOPROX

Previous Next

Package: emacs;

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

Date: Sun, 12 Jan 2025 17:56:02 UTC

Severity: wishlist

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Pip Cet <pipcet <at> protonmail.com>
Cc: 75521 <at> debbugs.gnu.org, stefankangas <at> gmail.com
Subject: bug#75521: scratch/igc: Delete unused macro DEFVAR_LISP_NOPROX
Date: Mon, 13 Jan 2025 14:16:15 +0200
> Cc: stefankangas <at> gmail.com
> Date: Sun, 12 Jan 2025 22:36:12 +0000
> From:  Pip Cet via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Also on master, the single user of DEFVAR_LISP_NOPRO is questionable:
> font.c doesn't staticpro Vfont_weight_table because it appears in
> font_style_table, but then font_style_table is sometimes modified so it
> points to a new vector, and I don't see how Vfont_weight_table is
> protected then.

According to this comment:

  /* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */
  static Lisp_Object font_style_table;

Vfont_weight_table is actually an element of font_style_table, and
that one is protected:

    DEFVAR_LISP_NOPRO ("font-width-table", Vfont_width_table,
		 doc: /*  Alist of font width symbols vs the corresponding numeric values.
  See `font-weight-table' for the format of the vector.
  This variable cannot be set; trying to do so will signal an error.  */);
    Vfont_width_table = BUILD_STYLE_TABLE (width_table);
    make_symbol_constant (intern_c_string ("font-width-table"));

    staticpro (&font_style_table);
    font_style_table = CALLN (Fvector, Vfont_weight_table, Vfont_slant_table,
			      Vfont_width_table);




This bug report was last modified 122 days ago.

Previous Next


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