Subject: 26.1; Incorrect byte-compile warnings

From: Drew Adams <[email-masked]>
Date: Thu, 17 Jan 2019 11:31:16 -0800 (PST)

Byte-compiling a sexp such as this:

 (make-obsolete-variable 'foo 'bar)

raises a warning such as this:

 Warning: make-obsolete-variable called with 2 arguments, but requires
 3-4

That's wrong.  It is incorrect that it requires 3 or 4.  It requires
only 2.

The code for `make-obsolete-variable' has this comment, which betrays
the probable (misguided) motivation for the warning:

 "New code should always provide the `when' argument."

New code?  This comment, and the resulting warning, seem to be targeted
at core Emacs developers, not users.

"Require" means require.  This function does NOT require 3 or 4 args.

It is important for backward compatibility that requier only 2 args.  It
might be desirable for users, as well as core Emacs developers, to use 3
or 4 args, but neither the 3rd nor the 4th should be required (and
neither IS required).  The warning should be removed - there is nothing
to warn about.

There are ways to _encourage_ users to add a third arg (WHEN).  Warning
them that it is _required_ is not appropriate.  The byte-compiler should
not lie.

Same misguided approach to `make-obsolete'.  Only 2 args are required.
It is inappropriate, misleading, and unnecessary to tell users that 3
are required.

In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor `Microsoft Corp.', version 10.0.17134
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''