emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#20241: closed (25.0.50; `setq' with only one argum


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#20241: closed (25.0.50; `setq' with only one argument)
Date: Mon, 23 Nov 2015 14:32:06 +0000

Your message dated 23 Nov 2015 14:31:12 -0000
with message-id <address@hidden>
and subject line Re: bug#20241: 25.0.50; `setq' with only one argument
has caused the debbugs.gnu.org bug report #20241,
regarding 25.0.50; `setq' with only one argument
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
20241: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20241
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 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 address@hidden
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'



--- End Message ---
--- Begin Message --- Subject: Re: bug#20241: 25.0.50; `setq' with only one argument Date: 23 Nov 2015 14:31:12 -0000 User-agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.1-RELEASE-p16 (amd64))
In article <address@hidden> you wrote:
> 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.

Fixed in emacs-25.  The interpreter now signals a wrong-number-of-args
error, and the byte compiler issues a warning.

-- 
Alan Mackenzie (Nuremberg, Germany).



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]