GNU bug report logs - #31715
cl-incf and cl-decf error out when passed a nil-valued variable as 'offset'

Previous Next

Package: emacs;

Reported by: Clément Pit-Claudel <clement.pitclaudel <at> live.com>

Date: Mon, 4 Jun 2018 20:08:01 UTC

Severity: minor

Fixed in version 29.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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Clément Pit-Claudel <clement.pitclaudel <at> live.com>, 31715 <at> debbugs.gnu.org
Subject: bug#31715: cl-incf and cl-decf error out when passed a nil-valued variable as 'offset'
Date: Tue, 05 Jun 2018 20:37:45 -0400
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> Noam Postavsky <npostavs <at> gmail.com> writes:
>
>> Oh, huh, I didn't think to check that case.  Maybe we should just change
>> cl-incf to disintguish between nil and unspecified then.

> That's quite hackish, just to make (cl-incf x nil) error, which is a
> backward incompatible change with no real gain.

But it's more compatible with other CL implementations!  (yeah, maybe
not worth it)

> Wouldn't we even lose the byte compiler barfing for something like
> (incf x 1 2)?

I didn't bother putting in the check for extra arguments, but of course
it could be done if we decide to go this way.




This bug report was last modified 3 years and 34 days ago.

Previous Next


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