* bug#34117: 26.1; Incorrect byte-compile warnings
@ 2019-01-17 19:31 Drew Adams
2019-01-17 22:20 ` Glenn Morris
0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2019-01-17 19:31 UTC (permalink / raw)
To: 34117
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''
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-18 8:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-17 19:31 bug#34117: 26.1; Incorrect byte-compile warnings Drew Adams
2019-01-17 22:20 ` Glenn Morris
2019-01-18 0:46 ` Drew Adams
2019-01-18 8:39 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).