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

From: Stefan Kangas <[email-masked]>
Date: Wed, 15 Jan 2025 13:55:35 -0800

Eli Zaretskii <[email-masked]> writes:

>> From: Stefan Kangas <[email-masked]>
>> Date: Wed, 15 Jan 2025 19:45:55 +0000
>> Cc: [email-masked], [email-masked]
>>
> Too bad you did that while we are still discussing the issue.  Why the
> haste?  The result is that we now have confusing code, see below.

Sorry, I thought we had agreed already.  See below.

> Heh, I was looking at these:
>
>   void
>   defvar_lisp_nopro (struct Lisp_Fwd const *o_fwd, char const *namestring)
>   {
>     eassert (o_fwd->type == Lisp_Fwd_Obj);
>     Lisp_Object sym = intern_c_string (namestring);
>     XBARE_SYMBOL (sym)->u.s.declared_special = true;
>     XBARE_SYMBOL (sym)->u.s.redirect = SYMBOL_FORWARDED;
>     SET_SYMBOL_FWD (XBARE_SYMBOL (sym), o_fwd);
>   }
>
>   void
>   defvar_lisp (struct Lisp_Fwd const *o_fwd, char const *namestring)
>   {
>     eassert (o_fwd->type == Lisp_Fwd_Obj);
>     defvar_lisp_nopro (o_fwd, namestring);
>     staticpro (o_fwd->u.objvar);
>   }
>
> (which are still different) because I remembered that the macros just
> called the functions.  And your changes didn't remove
> defvar_lisp_nopro.  Isn't that confusing?

Aha, okay.  I misunderstood your question.

I didn't think it was worth ifdef'ing those two functions for HAVE_MPS,
as I didn't consider that someone might find it confusing.  Do you think
it would be better if we did?