GNU bug report logs - #20241
25.0.50; `setq' with only one argument

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Wed, 1 Apr 2015 14:54:02 UTC

Severity: wishlist

Found in version 25.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: 20241 <at> debbugs.gnu.org
Subject: bug#20241: 25.0.50; `setq' with only one argument
Date: Wed, 1 Apr 2015 07:53:36 -0700 (PDT)
See for example: `(setq mark-active)' in `compilation-goto-locus'
(compile.el).

setq' should not be called with only one argument.  It "works", with the
effect of assigning a value of nil, but it is poor form.  Typically this
is a sign of a typo.

Beyond this particular occurrence, I think that a wrong-number-of-args
error should be raised when `setq' is called with an odd number of
arguments.  That certainly corresponds to the syntax that is documented.
And it corresponds to the doc explanations that using `setq' is the same
as using `set' and quoting the variable.  And it corresponds to the
definition and behavior of `setq' in Common Lisp.



In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2014-10-20 on LEG570
Bzr revision: 118168 rgm <at> gnu.org-20141020195941-icp42t8ttcnud09g
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'




This bug report was last modified 9 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.