From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dak@gnu.org, schwab@linux-m68k.org, emacs-devel@gnu.org
Subject: Re: setq's with missing final arguments.
Date: Sun, 22 Nov 2015 19:44:44 +0000 [thread overview]
Message-ID: <20151122194444.GD2332@acm.fritz.box> (raw)
In-Reply-To: <83y4dq2g3s.fsf@gnu.org>
Hello, Eli.
On Sun, Nov 22, 2015 at 05:44:55PM +0200, Eli Zaretskii wrote:
> > Date: Sun, 22 Nov 2015 14:10:31 +0000
> > From: Alan Mackenzie <acm@muc.de>
> > Cc: David Kastrup <dak@gnu.org>, emacs-devel@gnu.org
> > > The byte-compiler is not for imposing coding style.
> > That is why I proposed issuing a warning, not an error. In the actual
> > case I found, it was indeed an error.
> > > If it is wrong for setq to accept implit nil then it should be changed
> > > in setq and only then in the byte-compiler.
> > I would be happy enough for a missing final argument to setq to be an
> > error. But until that stage is reached, I think issuing a warning is
> > appropriate. But I disagree with you about priorities: it is more
> > important to catch the violations in our compiled code than worry about
> > the interpreted version.
> As long as 'setq' accepts this use case, it is not a violation.
It is a violation if it conceals errors. This indeed is the case: in
.../lisp/emacs-lisp/bytecomp.el, in defun
byte-compile-file-form-autoload the following erroneous code exists:
(setq byte-compile-noruntime-functions
(delq funsym byte-compile-noruntime-functions)
byte-compile-noruntime-functions)
. The effect is to set byte-compile-noruntime-functions unconditionally
to nil. The effect of that is to conceal some "function not defined \(at
runtime\)?" warnings in source files with `autoload' forms.
There are four other occurrences of missing values in `setq's throughout
the source (plus another one in .../obsolete). They all look like
deliberate "coding style", though. If it were up to me, I would put an
explicit nil in each of these four (or five) occurrences.
I have changed the warning's wording to be more "human": it now says:
missing value for `foo' at end of setq
. But I do say that this warning facility I have in my personal copy
should now be committed. It is useful.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2015-11-22 19:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-22 12:26 setq's with missing final arguments Alan Mackenzie
2015-11-22 12:31 ` David Kastrup
2015-11-22 12:35 ` Oleh Krehel
2015-11-22 12:44 ` Teemu Likonen
2015-11-22 15:53 ` multi-assignment setq [was: setq's with missing final arguments.] Drew Adams
2015-11-23 7:58 ` Oleh Krehel
2015-11-23 15:02 ` Drew Adams
2015-11-22 12:52 ` setq's with missing final arguments Andreas Schwab
2015-11-22 13:03 ` Artur Malabarba
2015-11-22 13:08 ` David Kastrup
2015-11-22 13:11 ` Andreas Schwab
2015-11-22 13:23 ` David Kastrup
2015-11-22 13:34 ` Andreas Schwab
2015-11-22 14:10 ` Alan Mackenzie
2015-11-22 15:44 ` Eli Zaretskii
2015-11-22 19:44 ` Alan Mackenzie [this message]
2015-11-23 1:36 ` Drew Adams
2015-11-22 15:42 ` Johan Bockgård
2015-11-22 16:04 ` Drew Adams
2015-11-22 15:52 ` Drew Adams
2015-11-22 23:08 ` Alan Mackenzie
2015-11-22 23:20 ` John Wiegley
2015-11-23 1:54 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151122194444.GD2332@acm.fritz.box \
--to=acm@muc.de \
--cc=dak@gnu.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.