GNU bug report logs -
#34117
26.1; Incorrect byte-compile warnings
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Thu, 17 Jan 2019 19:32:01 UTC
Severity: wishlist
Tags: notabug, wontfix
Merged with 24353
Found in versions 25.1.1, 26.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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''
This bug report was last modified 6 years and 126 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.