Subject: Re: bug#75521: scratch/igc: Delete unused macro DEFVAR_LISP_NOPROX

From: Eli Zaretskii <[email-masked]>
Date: Wed, 15 Jan 2025 15:53:10 +0200

> From: Stefan Kangas <[email-masked]>
> Date: Tue, 14 Jan 2025 16:46:06 -0500
> Cc: [email-masked], [email-masked]
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> From: Stefan Kangas <[email-masked]>
> >> Date: Mon, 13 Jan 2025 21:09:02 +0000
> >> Cc: [email-masked], [email-masked]
> >>
> >> Yes, indeed, but that seems like an optimization that is not worth
> >> doing.  Not these days, at any rate.
> >
> > If you try to staticpro too many variables, the build will fail
> > because Emacs runs out of space in staticvec.  Not everyone knows what
> > to do in this case, and it's an annoyance when this happens.  So I
> > would not say so easily that it's an optimization not worth doing, no.
> 
> NSTATICS was last increased by Paul in 2013 (4195afc389bb).

Actually, it was a year before, but I don't see how that changes the
fact that redundant protecting should be avoided.

> I ask to consider again what are the benefits of keeping this macro.

There are no benefits in keeping it.  But there are risks in removing
it, because that requires changes in font.c, in code which we don't
understand well enough (see this discussion as the evidence), and thus
could inadvertently break by some change.

> >> Note that with MPS, DEFVAR_LISP and DEFVAR_LISP_NOPRO are equivalent.
> >
> > When the igc branch lands, this will be a non-issue, yes.  One more
> > reason not to waste too much effort on this code now.  But since the
> > genie is out of the bottle, we must.
> 
> Are you okay with removing this on the scratch/igc branch only?

I have no problems with doing that on the branch conditioned by
"#ifdef HAVE_MPS", if indeed DEFVAR_LISP_NOPRO is equivalent to
DEFVAR_LISP there.  But are they indeed equivalent?  staticpro still
exists on the branch, and AFAICT we create a root from staticvec.  So
why are they equivalent?

> >> So by getting rid of DEFVAR_LISP_NOPRO, we would reduce the delta
> >> between igc and master as a nice bonus.
> >
> > Why do we need to reduce the delta? what does that get us?
> 
> IME, all things being equal, it's always going to be easier to review
> and eventually merge changes if the delta is smaller.

For such significant changes, I don't expect anyone to eyeball the
diffs when merging the branch.