Subject: Re: bug#78125: 29.3; Obsolete text-mode-variant used in elisp manual

From: Eli Zaretskii <[email-masked]>
Date: Tue, 29 Apr 2025 10:13:32 +0300

> From: [email-masked]
> Date: Mon, 28 Apr 2025 18:15:31 -0700
> 
> 
> >From emacs 29.3, open the Elisp info documentation.  That
> documentation says it is for emacs 29.2.  The `Example Major Modes`
> includes the code `(setq-local text-mode-variant t)`.
> 
> I tried using some old code that included that command.  The result was
> 
> .emacs:39:15: Warning: âtext-mode-variantâ is an obsolete variable (as of
>     27.1); use âderived-mode-pâ instead.
> 
> So I think the example needs to be updated.

Thanks.

I updated the example on the emacs-30 branch, but note that the actual
definition of text-mode still sets that variable, since we haven't
removed it yet.

> A secondary matter: naively following the error message would result in
> this code: (setq-local derived-mode-p t), which I assume is a bad idea
> and probably an error.

Yes, you are supposed to look up the documentation of the replacement
to figure out how to use it.  I made the text of the obsolescence
message more clear in that regard.

And with that, I'm closing this bug.