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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Clément Pit-Claudel <clement.pitclaudel@HIDDEN>; dated Mon, 4 Jun 2018 20:08:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 6 Jun 2018 00:37:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 05 20:37:54 2018
Received: from localhost ([127.0.0.1]:35699 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fQMSY-0003xg-4C
	for submit <at> debbugs.gnu.org; Tue, 05 Jun 2018 20:37:54 -0400
Received: from mail-io0-f175.google.com ([209.85.223.175]:42101)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fQMSW-0003xU-Qs
 for 31715 <at> debbugs.gnu.org; Tue, 05 Jun 2018 20:37:53 -0400
Received: by mail-io0-f175.google.com with SMTP id r24-v6so5611357ioh.9
 for <31715 <at> debbugs.gnu.org>; Tue, 05 Jun 2018 17:37:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=y2RYs3mDVY+9iMX7Fl4goKIkzWsr+yUet36lR6U2Fm4=;
 b=dCDfDHer0DAvxg7Le26BgGQ0HNRR7pSlXA8CKIbEyrvsRTdxFxZVZYAUWKeY8yCQda
 wEkTVUvB/xZotacX8FLnHzmUVpkPLmBwT2BPWGICsb/ZhXZpnlzp5XfFPYP+FjkAEl0b
 BpI144rfs72mN00PASfah6syaLGQ41UsVcQUT7pt3RrZIna5nvH4JiEKLqBhnXZ3Nelt
 2IDs1HleNrJVXB7T9I5EdNsJN3ytzheXiC8cy1GddiymjrWbr22I0mia1vrmgmzZmHQE
 93rvw4oQYlTH8X+zPpRUII/gkMylWC4Nhp41QDgps0/ipo0pXeeicYoARLSYwaB4X+/7
 xafw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=y2RYs3mDVY+9iMX7Fl4goKIkzWsr+yUet36lR6U2Fm4=;
 b=o8cxflx6glbiIPewT4FXwDANQCEBP+0ap5aHZRf9sTttf6pEGxllYr6ZEkU8P9r5Up
 JcnyK8Y/Spq9IvS/MUue/NXO+ZqCK3X3u0E+aLH1/Q60yhTKVNrV94NzZYR4jrzVxhL2
 2KLcSsiNUIf2B3YHdnxVVW8/NYSG/FG+P7iSzCmWn+4Cq+nGPqM9RLlp/fKbrvXMc08h
 XhoD7wX5mfQWYNwJAMgu8XMBcDqiK4jsidgw/sUVyYtUSCcK92SRSc0AV85FgkOVjBmM
 Thu+oMnvnEORn61R5snk220eOUqUFkSvuh2Q3ZGvtcbqGXGo8Z+nTE4RjrpN4Dzx0J6g
 S1cQ==
X-Gm-Message-State: APt69E1MJMV2snzf4503wYThhrrg4y8s+kXX7FRxGlz0yvD9zbkPTVbo
 zkXPO9FzP90lGZMtwSFVFPmEbTo+
X-Google-Smtp-Source: ADUXVKJjQgZlPTAO+HOCEir0ZXbPjtv0oSo3fTJtWbkd6jb3PCVTgAYiQYx4qX8C16EfBbjD09Irnw==
X-Received: by 2002:a6b:2b10:: with SMTP id
 r16-v6mr834787ior.204.1528245467354; 
 Tue, 05 Jun 2018 17:37:47 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 m3-v6sm6402614ioc.70.2018.06.05.17.37.46
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 05 Jun 2018 17:37:46 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN>
 <871sdm851q.fsf@HIDDEN> <bae46622-25a7-a949-f965-021e8e965b5c@HIDDEN>
 <87k1rc7sly.fsf@HIDDEN> <6176bcee-a8da-8547-762b-4174652ad2a0@HIDDEN>
 <87h8mg7r2c.fsf@HIDDEN> <87y3fsoiul.fsf@HIDDEN>
Date: Tue, 05 Jun 2018 20:37:45 -0400
In-Reply-To: <87y3fsoiul.fsf@HIDDEN> (Michael Heerdegen's message of "Wed, 06
 Jun 2018 02:32:18 +0200")
Message-ID: <878t7s697q.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 31715
Cc: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel <clement.pitclaudel@HIDDEN>,
 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Noam Postavsky <npostavs@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 6 Jun 2018 00:32:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 05 20:32:31 2018
Received: from localhost ([127.0.0.1]:35686 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fQMNK-0003pg-Uj
	for submit <at> debbugs.gnu.org; Tue, 05 Jun 2018 20:32:31 -0400
Received: from mout.web.de ([212.227.15.3]:51187)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1fQMNI-0003pS-JF
 for 31715 <at> debbugs.gnu.org; Tue, 05 Jun 2018 20:32:30 -0400
Received: from drachen.dragon ([188.110.196.170]) by smtp.web.de (mrweb003
 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Maazp-1fjwWg0FXF-00K9DN; Wed, 06
 Jun 2018 02:32:19 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN>
 <871sdm851q.fsf@HIDDEN>
 <bae46622-25a7-a949-f965-021e8e965b5c@HIDDEN>
 <87k1rc7sly.fsf@HIDDEN>
 <6176bcee-a8da-8547-762b-4174652ad2a0@HIDDEN>
 <87h8mg7r2c.fsf@HIDDEN>
Date: Wed, 06 Jun 2018 02:32:18 +0200
In-Reply-To: <87h8mg7r2c.fsf@HIDDEN> (Noam Postavsky's message of "Tue, 05
 Jun 2018 19:26:51 -0400")
Message-ID: <87y3fsoiul.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:0MVH//2SxO4EPwkg4YbapJuPVvEY5hVO3V3vWSNy08xBX6UhqmG
 UwpNTyOmwiT9wGJSkJILDKQXObQaruYfO6UJnrSlKVsTrUPFKk9g1+0PodmrSpB5YDyCAVA
 sCK3aebC+BRYRHsCOPzlIYgUJa2+OkPrwj7LFSft2TOvwdMphEJgXm8FtITmV98uEUnXgqX
 Y94SZBEnydGB8imwo10+w==
X-UI-Out-Filterresults: notjunk:1;V01:K0:5InlT+FGahE=:YMP4qKQpl5aaSxDm0okwlx
 GziZ68pCx2dQyuvmnpKoBTStIf1xpoSLfb4smVGoIylr2lIib4mWyQ8LoKIv1dLWWuGk+7vKd
 bHmu+oUH7kzWkyHKn31EHWscMkzlfCjGG3iKgF+Y7b2wsadD7bwNmFB31d1FjoVXAZs1nwkYi
 w3uI+XHtPlLTqUHP7zjOXXZ/O9CmBCYEHKrlZemwhzphxNyCwfpBJ20xtx7uGsi18Jv/l/bru
 /jy4d5kr9pP9rv8gIBeHgqikLuARPHD4xCe8Hf/h2rO77bt0/4zaCt6As1316S5ELEiht+AEg
 g5J/SFxlHCIFjpAO2cobNiVjyxXeRTjh2AL6+xMvsBueU3btVJt4ou1bsFyFDOBinmSLLM9ab
 Rdc0dYEl+CKsWXkJ+MujlCFh8x5idQa+K+NsgHQyfC5G9sg8eCWEIlsSQWIpVXohp9AgqAaHP
 bPFA0zvedvXtw19xRADxZ/XigrmyBbFurE5Llt8eo1o/zgrI69GHtXto0jXF8biKyBCpWdwS0
 7vyCCoSBo2IMbk32Cy45gl1wjBS/5+tlwJl5pU9p2N01Plu2QIcVeXrVmDHa3b5ULtWVNqpyi
 WKfzKxPqIqEpwgMl2JWLfM+WhG8ybSq8lqIMAbe40/MZZuDnAwEVX0cOzx3ZSfWCcmuHGh3WY
 24rDKV0mAKqtHduUMEDIexwCd4Qp/aiF7KvYUVKKA16tf2IPxatbUlOvyzg/W+4A3y2Pwbl69
 ToJcrFBqRIZ7WmLqzREMB6ozxwnx03zuuqDgocCVnFt383QWim8Y9lhH7tAoEt9rYqKOHr2LQ
 ER5Vy3c
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31715
Cc: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel <clement.pitclaudel@HIDDEN>,
 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Noam Postavsky <npostavs@HIDDEN> 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.
>
> (defmacro cl-incf (place &rest args)
>   "Increment PLACE by X (1 by default).
> PLACE may be a symbol, or any generalized variable allowed by `setf'.
> The return value is the incremented value of PLACE.
>
> \(fn PLACE &optional X)"
>   (declare (debug (place &optional form)))
>   (let* ((got-x (= (length args) 1))
>          (x (car args)))
>     (if (symbolp place)
>         (list 'setq place (if got-x (list '+ place x) (list '1+ place)))
>       (list 'cl-callf '+ place (if got-x x 1)))))

That's quite hackish, just to make (cl-incf x nil) error, which is a
backward incompatible change with no real gain.  Wouldn't we even lose
the byte compiler barfing for something like (incf x 1 2)?


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 5 Jun 2018 23:36:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 05 19:36:53 2018
Received: from localhost ([127.0.0.1]:35589 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fQLVV-00030j-II
	for submit <at> debbugs.gnu.org; Tue, 05 Jun 2018 19:36:53 -0400
Received: from mout.kundenserver.de ([212.227.126.187]:49801)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <clement.pitclaudel@HIDDEN>) id 1fQLVT-00030U-K8
 for 31715 <at> debbugs.gnu.org; Tue, 05 Jun 2018 19:36:52 -0400
Received: from [192.168.1.109] ([73.126.99.55]) by mrelayeu.kundenserver.de
 (mreue007 [212.227.15.168]) with ESMTPSA (Nemesis) id
 0MRvbR-1fslUb0XG5-00Sw7a; Wed, 06 Jun 2018 01:36:44 +0200
To: Noam Postavsky <npostavs@HIDDEN>
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN> <871sdm851q.fsf@HIDDEN>
 <bae46622-25a7-a949-f965-021e8e965b5c@HIDDEN> <87k1rc7sly.fsf@HIDDEN>
 <6176bcee-a8da-8547-762b-4174652ad2a0@HIDDEN> <87h8mg7r2c.fsf@HIDDEN>
From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= <clement.pitclaudel@HIDDEN>
Openpgp: preference=signencrypt
Autocrypt: addr=clement.pitclaudel@HIDDEN; prefer-encrypt=mutual; keydata=
 xsFNBFStGiEBEAC8eHa+DdcrVtDSwYoIgoUtMfRAan4bdLxZuNIASy6iFytCHNsKqfPkq8zD
 YV2+uMtbdcnjapE038nidEMItNhO04JdZ+PJ6jvJo1gW+XI4fM8uzkGZauwR+d3hEq6goFSp
 rIlSlaVf2g5q4OKxI754yqwz00++EZhZQMntzoKQVV9stJ5eQ+gxTT1ANr7wQKbjn/8PM/Cg
 hBZvYLhh+WsS0Ko5qZuWdsvUBLpprmCWkP4FpZ234/tWpdVID65nlHpu25+6ajIcxfCIK+dN
 2br0wN1szTeQFG19cfr3jXEvwHmLQbQqCg4UH+2b7JpMGR2/KWjqRWfWVvZMPVeJdOsZHx53
 k6HIbEhvFBHbmqCI6FAZQjkgzGGkrSD92+jeMYiCTxRKqq2hFZ6xqQ6pJdXD1TXcIYPEs7rA
 MwcNMj8g4e6vuI+2CjHyQQkyMPAEi8guNPnyfBb648f1lxj7JiJu/ehRghIP5u/kLOsHNCKG
 QgCT04sawBZYHqEVYni8oHlGJcdWGT5/UI4B+wn70eXvYSScZEaB+S2s/bD0cdlSpHY5Od3l
 tpRZTva+ydswlrz4fxbYF45s6rFpqVwBMfNv3gqhBFXbuiEEctcTSGqhHxxT4R+24Yn+ZSBa
 EfUbrKn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r2WCzdRut6/HIXcrFHIFjzHokIqartiO
 0J0tmANHEACjmDgF6E1XlUi0SnNXDV0Us2z4843kEocj8Z6zFNQkuMy0ArQbuxVG0i5jaRaA
 nI6nLB+ouU4UJNUnzrVnVr2sQuruMIIb9u7DVTodwfkrEVw0aoiSW3D7CTATZcBihOo8NZjm
 hze1s8uad9n9PQF+gigV
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
Message-ID: <b8fb26bb-f184-ba23-3f08-80ad78dfd009@HIDDEN>
Date: Tue, 5 Jun 2018 19:36:41 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <87h8mg7r2c.fsf@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="I2WRlzTrkoVAm2cBoldn5di40t775WtJs"
X-Provags-ID: V03:K1:dDAuBkRWb3AJjrK99/qIWZhV9J89TQZGIo8bUhu0EzzidpV7CkH
 7zP+24mgPno15OJX2qyCCMLkqUAIvWQUFfswnT4OCbFrirZG5banvxMc1/ssIHXdE+VdtYO
 Nihpx5xmemLzn5QR733h9kgfAUzOThT8nV0muXVqTUtOqXp/QGlDnn9C/05lYEgH4XUIRLv
 UwpUvcbWwzQyG1kdu6Fnw==
X-UI-Out-Filterresults: notjunk:1;V01:K0:OFM6Oh2Hxtg=:051W/KZLGJ/d20FolNO3S8
 6Q1zdDCd3Qk0AcappS7gwxdSeI7kE+xLltFx8D7/cBaU68jl3iDYUa1sG7K67oBJ+DOxgy9Ch
 5QDfV3hzsUu1N80psDJHowS9PEinmLNEO2Pe9NbxSwaA3Gq1cjWYejqE5MqYvkPfOseY0njgR
 AEvt4PoNyz1GqPEDQQ5tCabTq/uWmSCcuMhexvQB3cYXXiUlY0ipe7JgMsCWXZGmeONXbki9q
 tdOLf9z6pwTEOCc5KH1M8qRgp0czzqx4E6klbqMLeqx2uQ/tKd24KygJOymIP1eSTq4RKCB5v
 DKdFAWqhHnWxHtpFM4ugOFW33RhNgpBhdHcMnf9Df4gl1kNpK2NzsLFvYMZNaFUkCsF2T+/99
 478IfZYJXEVXL9SF90F38CodLfoXBvesXoVn6JC9q9PhGv7jTnxGaVKdSn/yPhdQ5obTkf0r1
 7osMDel6l1G+qL+egAw2JP/b0rbHUygUAks7EPqB9JIUk8VwFZfJssQSNt+kOaODe0TrI3pi7
 Gh5O7zgzHSYDa8U4J60EleW0OEfM5wHEfUDqLxjenp13R4HEQybbyPL4tv2VIRKEvszkSj2Do
 m9Xb3ACJN73czWJhS85d30gfTKGyL7/Oco9ga8EBDlnTdv98dP8VdphD/wxsYRJg3BrL948Af
 68mcorMnnbnfFfIz1KclSq8cTJGEuHSU5usOnmr03aChYjpzh0tyjI33gbmW8VD3QYq0=
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 31715
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--I2WRlzTrkoVAm2cBoldn5di40t775WtJs
Content-Type: multipart/mixed; boundary="ZEtLcEEVKNKUpR4O9AhC0cdTsLAtTe455";
 protected-headers="v1"
From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= <clement.pitclaudel@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 31715 <at> debbugs.gnu.org
Message-ID: <b8fb26bb-f184-ba23-3f08-80ad78dfd009@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN> <871sdm851q.fsf@HIDDEN>
 <bae46622-25a7-a949-f965-021e8e965b5c@HIDDEN> <87k1rc7sly.fsf@HIDDEN>
 <6176bcee-a8da-8547-762b-4174652ad2a0@HIDDEN> <87h8mg7r2c.fsf@HIDDEN>
In-Reply-To: <87h8mg7r2c.fsf@HIDDEN>

--ZEtLcEEVKNKUpR4O9AhC0cdTsLAtTe455
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable

On 2018-06-05 19:26, Noam Postavsky wrote:
> Cl=C3=A9ment Pit-Claudel <clement.pitclaudel@HIDDEN> writes:
>=20
>> I'm not sure what to make of the result with SBCL and CLisp, since
>> (incf x nil) also fails in both of them (whereas it works for us,
>> since we can't distinguish nil and unspecified).
>=20
> Oh, huh, I didn't think to check that case.  Maybe we should just chang=
e
> cl-incf to disintguish between nil and unspecified then.

Hmm, neat trick! Wouldn't that be backwards-incompatible, though?
Plus, it's not common for ELisp functions to distinguish between unspecif=
ied and nil, and changing cl-incf that way would make it less convenient =
to wrap in other macros.  If it doesn't had runtime costs, I'd be in favo=
r of going the other route, and making sure that (cl-incf x y) adds 1 eve=
n when y is bound to nil.

>>> I don't think those are great examples of macros to emulate.
>>
>> Agreed, I was just collecting other examples, both in support and agai=
nst my point.
>=20
> Yeah, I just meant we can't really use those examples either to support=

> or argue against your point.

OK :)


--ZEtLcEEVKNKUpR4O9AhC0cdTsLAtTe455--

--I2WRlzTrkoVAm2cBoldn5di40t775WtJs
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJbFx6JAAoJEPqg+cTm90wj1ScP/R97nK3yNb0C4im6mKUXEbjx
rUbx4ZvYOmJ0dNiSWQV6zMB9a7L4nzqcxfNszwEjf+UCqYKU6cKI/KcOh+rSRkex
cB43Yqe80UpNwDlwGTwdZxiF7d19LpU8SNLapKyVO/l5jwcCYLCA1AgyZy/3euY3
JuRIxIC4MsL6edbZJLTfskzLLWt1Ub/6oFiQQmLvmWwcdf1/GgP1aPaltVjhna6u
u0vMilqF30GqNG5rOPdVh9pEm3A6WKxpjQokwGc+md4pkdSzylzssNUBeyv/cyQo
l+0fvKULKt+1ZRr0OCgtU8L3ZRjSh4d9k+MVMbcYGEARYgvsG6tVwf7WJ2j7qPLq
zaYt3bNA/xb95NJAmMKpWF5GhnLiCbmPwy6jXxuSnPDhBZSxewQssTCfjQgLZxvC
zfFoRwjWp6HlkIWDIPAvM+K04Y90bJWGSz2bie8KoToml1N5b6i7YI9ML+hDLZjn
cmjSPf/knSmXdds8hbF1C7BUDNQ6L6cKFawkiT8DmYWW7GI1vDPnfmX9OVntenZp
+ZRn5lRojrBEBBVCCwgyE6bbABozcFtQITDhYC+zVhuHTR6DeXxE3Di8UhSDpzuV
gmw+pJUuA8jnduD35Ot95IqT0g8MR/YxqEKYL3jLECJcBASLaLhsUkknn8BbKUO8
gGdYJi0iCpVSxaO3hQMv
=YekE
-----END PGP SIGNATURE-----

--I2WRlzTrkoVAm2cBoldn5di40t775WtJs--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 5 Jun 2018 23:27:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 05 19:27:00 2018
Received: from localhost ([127.0.0.1]:35584 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fQLLw-0002mI-JR
	for submit <at> debbugs.gnu.org; Tue, 05 Jun 2018 19:27:00 -0400
Received: from mail-it0-f47.google.com ([209.85.214.47]:52720)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fQLLv-0002m4-BF
 for 31715 <at> debbugs.gnu.org; Tue, 05 Jun 2018 19:26:59 -0400
Received: by mail-it0-f47.google.com with SMTP id m194-v6so5722159itg.2
 for <31715 <at> debbugs.gnu.org>; Tue, 05 Jun 2018 16:26:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=eHrII9blxWHAlkxhiaIMuq9eJnigDX2X/hNfBtzwOTQ=;
 b=mPST+MqsG/sqm99UagpBJTscV9NkQ+S3jUvep2Y3fBVyuwtuxQzoAjAP8/GFV1ijgp
 MwQcGvD1jRt6DQYBn8i4JKyw72mlqDCeV28MAByfx8PMKYZXYZ5/aSGn18ACjLj6VLYa
 BGbfXbiObIE8o9cbjLtBl0hI30VeYiUQqifXD3BF6KjXkt19WeuXwmbTji7v74m4gaJB
 BIbB1y5PShs5tsxDl9BL+jTLzlkc4NSSGginn5a4WYU1TFJHAgzqtVaom6rmdUybbo12
 79gzaXEarTr47iO0TSxUt9fT8uY9IPgMmKcmkqmZdZWoueGfX7v9+IoYsoRi+RByBtPr
 FKJA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=eHrII9blxWHAlkxhiaIMuq9eJnigDX2X/hNfBtzwOTQ=;
 b=EYaSZ0jpQCEVUEqyRGW1bROop2wEV91IPLnrydDx/TrZQV6mgRjMALoofiwJykgKds
 K4EVd+mo3XoQLDu/30eMMgN41UbxLQFOBip3w9d7VCRu3wqcPBeUA1hXk4OxNkJNewWN
 8StrR5+iRu/umMr4nTgvEhTEoX9VqFvUOreDJpzeX3g5nGaWFv7X1MknpJ7E7bBzyDNy
 iSp3tmGTiWDO4z4+KNmj//FTbq3pNkO3yUV4jTTgYfap2Try+7zFBp/ppAiKY1xfR0jY
 2VAy8/67DeyR3HHcLcDIk2qBSBIrWrcx9qlQte8Yzy3mn2DE5x5Ga6J/KlLD0izq75SO
 EcQA==
X-Gm-Message-State: APt69E1gMqtRI8Xi80yI4ryJ5anEKl2xzdNShddjOO+iiMVaoawbpWuk
 v4QJj4dwaITlvQFqrIYDmN8euw==
X-Google-Smtp-Source: ADUXVKI8thOgo1qiCoRM8lxi2dvvht8Re5FlTt9LkCqAK/F7ounXa+oQSKzxi9AuA2GTYv1D+ZDzpg==
X-Received: by 2002:a24:43d4:: with SMTP id
 s203-v6mr284287itb.110.1528241213727; 
 Tue, 05 Jun 2018 16:26:53 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 u83-v6sm6110577iod.54.2018.06.05.16.26.52
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 05 Jun 2018 16:26:52 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel <clement.pitclaudel@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN>
 <871sdm851q.fsf@HIDDEN> <bae46622-25a7-a949-f965-021e8e965b5c@HIDDEN>
 <87k1rc7sly.fsf@HIDDEN> <6176bcee-a8da-8547-762b-4174652ad2a0@HIDDEN>
Date: Tue, 05 Jun 2018 19:26:51 -0400
In-Reply-To: <6176bcee-a8da-8547-762b-4174652ad2a0@HIDDEN>
 (=?utf-8?Q?=22Cl=C3=A9ment?=
 Pit-Claudel"'s message of "Tue, 5 Jun 2018 19:01:56 -0400")
Message-ID: <87h8mg7r2c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 31715
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Cl=C3=A9ment Pit-Claudel <clement.pitclaudel@HIDDEN> writes:

> I'm not sure what to make of the result with SBCL and CLisp, since
> (incf x nil) also fails in both of them (whereas it works for us,
> since we can't distinguish nil and unspecified).

Oh, huh, I didn't think to check that case.  Maybe we should just change
cl-incf to disintguish between nil and unspecified then.

(defmacro cl-incf (place &rest args)
  "Increment PLACE by X (1 by default).
PLACE may be a symbol, or any generalized variable allowed by `setf'.
The return value is the incremented value of PLACE.

\(fn PLACE &optional X)"
  (declare (debug (place &optional form)))
  (let* ((got-x (=3D (length args) 1))
         (x (car args)))
    (if (symbolp place)
        (list 'setq place (if got-x (list '+ place x) (list '1+ place)))
      (list 'cl-callf '+ place (if got-x x 1)))))

>>> In the rest of Emacs there are lots of other examples.  Many of them
>>> (for example semantic-find-tags-by-name or calendar-increment-month)
>>> seem to work when passed a nil-valued variable, but many others behave
>>> like cl-incf (for example gnus-summary-article-score).
>>=20
>> I don't think those are great examples of macros to emulate.
>
> Agreed, I was just collecting other examples, both in support and against=
 my point.

Yeah, I just meant we can't really use those examples either to support
or argue against your point.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 5 Jun 2018 23:02:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 05 19:02:10 2018
Received: from localhost ([127.0.0.1]:35578 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fQKxu-0002EX-DX
	for submit <at> debbugs.gnu.org; Tue, 05 Jun 2018 19:02:10 -0400
Received: from mout.kundenserver.de ([212.227.126.135]:40795)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <clement.pitclaudel@HIDDEN>) id 1fQKxr-0002EK-Rw
 for 31715 <at> debbugs.gnu.org; Tue, 05 Jun 2018 19:02:08 -0400
Received: from [192.168.1.109] ([73.126.99.55]) by mrelayeu.kundenserver.de
 (mreue002 [212.227.15.168]) with ESMTPSA (Nemesis) id
 0MIUU3-1fQcD91wsR-004C6b; Wed, 06 Jun 2018 01:02:00 +0200
To: Noam Postavsky <npostavs@HIDDEN>
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN> <871sdm851q.fsf@HIDDEN>
 <bae46622-25a7-a949-f965-021e8e965b5c@HIDDEN> <87k1rc7sly.fsf@HIDDEN>
From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= <clement.pitclaudel@HIDDEN>
Openpgp: preference=signencrypt
Autocrypt: addr=clement.pitclaudel@HIDDEN; prefer-encrypt=mutual; keydata=
 xsFNBFStGiEBEAC8eHa+DdcrVtDSwYoIgoUtMfRAan4bdLxZuNIASy6iFytCHNsKqfPkq8zD
 YV2+uMtbdcnjapE038nidEMItNhO04JdZ+PJ6jvJo1gW+XI4fM8uzkGZauwR+d3hEq6goFSp
 rIlSlaVf2g5q4OKxI754yqwz00++EZhZQMntzoKQVV9stJ5eQ+gxTT1ANr7wQKbjn/8PM/Cg
 hBZvYLhh+WsS0Ko5qZuWdsvUBLpprmCWkP4FpZ234/tWpdVID65nlHpu25+6ajIcxfCIK+dN
 2br0wN1szTeQFG19cfr3jXEvwHmLQbQqCg4UH+2b7JpMGR2/KWjqRWfWVvZMPVeJdOsZHx53
 k6HIbEhvFBHbmqCI6FAZQjkgzGGkrSD92+jeMYiCTxRKqq2hFZ6xqQ6pJdXD1TXcIYPEs7rA
 MwcNMj8g4e6vuI+2CjHyQQkyMPAEi8guNPnyfBb648f1lxj7JiJu/ehRghIP5u/kLOsHNCKG
 QgCT04sawBZYHqEVYni8oHlGJcdWGT5/UI4B+wn70eXvYSScZEaB+S2s/bD0cdlSpHY5Od3l
 tpRZTva+ydswlrz4fxbYF45s6rFpqVwBMfNv3gqhBFXbuiEEctcTSGqhHxxT4R+24Yn+ZSBa
 EfUbrKnVTUmV20k+57rghiVw2wpj8v7sn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IqartiO
 0J0tmANHEACjmDgF6E1XlUi0SnNXDV0Us2z4843kEocj8Z6zFNQkuMy0ArQbuxVG0i5jaRaA
 nI6nLB+ouU4UJNUnzrVnVr2sQuruMIIb9u7DVTodwfkrEVw0aoiSW3D7CTATZcBihOo8NZjm
 hze1s8uad9n9PQF+gigV
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
Message-ID: <6176bcee-a8da-8547-762b-4174652ad2a0@HIDDEN>
Date: Tue, 5 Jun 2018 19:01:56 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <87k1rc7sly.fsf@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="qJlmaD5nQCoyKtOLGGEXXWx6D6WO5Yy8j"
X-Provags-ID: V03:K1:nexosqSuQPtAP8i1h6ROW0ikhRHw7tDwcdBdq6b2h67SNlmFf/v
 3OyrnFETvd45QveGqfA9FNZG0ikArmrue2XSCfDiXPUhtdyK4mn+oeJuq4hXuzf2wDQB+cB
 dAH+jw46IBTSz0t+mr2ibJZ2sNblSGRLYO6BZVMUkmCPZrXX8v2DWZmbegZs8Aga5QjH88C
 3yYy8LDb9UAWJXLNBbhWQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:NHae+ihNcvo=:b3BrfQXXeegVh/28tNsa8c
 OToz/cyR3YgEsomrybXDYbQja3AyEfHrKZELNdl2ysJFFN//B+sS3EzTyVnOzoJJMCzEXIqXu
 VQbfG9bjSWxsIIwGuu6oaZRuEoEI4VKwfDU8Z5cbPsYeYu+pEaz7itGwqE1+q1NqFVvtfuvRt
 DgIqgx/vJddpWbl9/MrmMHLgISGc53sOk9Db4pj7PT4HT8B9+WvdjagKQ4FLf3Q8qbHRsi7L5
 VzL9lxRp8tEW6WGrEGfP3tgkTBIsQ4lRL7l7xrS5m8IkKcnFRzFwRQAzq0i2jytLYY6rNEePt
 K3DZDjOiRvxNMil5vhNFz4IkJ9X4MVLIneCpJkMe7FPU9h+PBt7F12TAsDYBAKsa2F/lZdma+
 3V92sy4TDTD9RFqkLJtRz5/hL8sVDuc+5F1MDBW0xg9l4plxYs9+Dmix/GR6MLYZOXhFwHhhr
 F3ThEuTNuAhjTpaP6DhXHOmM7900KeqsxxfUgYHO394thUg9KwAdwcdsLVsATlBmP93EvhUa6
 YJXb2OAMhWAs4BTcDfpPAHBjEOE1YWvK6ovkC4vV34pLUNwttQML+kWOQa51R2dtfUbNVKQLt
 W++2zwB6LEsFTY/ffloCOrStqsbIiZg2gr6nIGu3BWBH0SMlOr7jQt52tR4W/8nsMUrXiJ44D
 KP6OewBHoWQVBeCtvYK9gfkSngeBeVivSNzHunyPrROeX4ArMAZId1KXSRMxLprQHJwU=
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 31715
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--qJlmaD5nQCoyKtOLGGEXXWx6D6WO5Yy8j
Content-Type: multipart/mixed; boundary="sZJnlp2isG5XXx23F1UTcLcFwCaBYBcaD";
 protected-headers="v1"
From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= <clement.pitclaudel@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 31715 <at> debbugs.gnu.org
Message-ID: <6176bcee-a8da-8547-762b-4174652ad2a0@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN> <871sdm851q.fsf@HIDDEN>
 <bae46622-25a7-a949-f965-021e8e965b5c@HIDDEN> <87k1rc7sly.fsf@HIDDEN>
In-Reply-To: <87k1rc7sly.fsf@HIDDEN>

--sZJnlp2isG5XXx23F1UTcLcFwCaBYBcaD
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable

On 2018-06-05 18:53, Noam Postavsky wrote:
> Both SBCL and CLisp throw an error for (let ((x 1) (y nil)) (incf x y))=
,
> although I can't see anything in the Common Lisp spec to decide either
> way.  E.g., cltl2 says:
>=20
>     If delta is not supplied, then the number in place is changed by 1.=

>=20
> https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node125.html

Thanks for looking up the spec and testing other implementations.  I'm no=
t sure what to make of the result with SBCL and CLisp, since (incf x nil)=
 also fails in both of them (whereas it works for us, since we can't dist=
inguish nil and unspecified).

>> In the rest of Emacs there are lots of other examples.  Many of them
>> (for example semantic-find-tags-by-name or calendar-increment-month)
>> seem to work when passed a nil-valued variable, but many others behave=

>> like cl-incf (for example gnus-summary-article-score).
>=20
> I don't think those are great examples of macros to emulate.

Agreed, I was just collecting other examples, both in support and against=
 my point.

Cl=C3=A9ment.


--sZJnlp2isG5XXx23F1UTcLcFwCaBYBcaD--

--qJlmaD5nQCoyKtOLGGEXXWx6D6WO5Yy8j
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJbFxZlAAoJEPqg+cTm90wjY3kQAJSfwNZMfoGWgbsgusHAjoTG
IeT70dXLX/QDyzAtUiwJkOElmj5BTd2Jwv/7XBlJPTGx4KKQ0nHgDQM0zF8NheQ2
SINRUxkk/fDsFQlyi5fjACrfBxBvYrgtxSNP0JUMqohsZ9aotAL/aOaH1O7WRpTj
uO5LATtwfiOIkDG12cB5vq9ljsbFPS0j7DJs7JalWsY1qbmxBb8x6DzBBXFpEZfz
nBTFuBZUo7mr1fVimt39TnbtjnEGckQfFOa6+9kQ/EJ40I2K4LENmUbd8RM1Jj/O
cgxWY6L+IwBIe+jHhHshVirHGWFt4+n++4wO6JnXNU8YzNUe3n15+o66/lNPnBRE
1R/VESV0w2ksLajPq3NoRPxQPKGOw2GjK2JJYxiBoGqlfSLa6VWjNJv0u8I3k2Af
3e/D7w/YWz/34uKDuRXPczd+WX0HgL0xEFtV6Xs2YGveLuJSHDIiQtRGbanUxLiM
eQTW5Xukm6zOd2ozCVAIkbi2oUWB2F2X7MQFWIBZPUpkK2MMmK1D5fhWFxLo07At
1kTX8aN6nRf1mcLpI/5lxVDPujW4DiXT9y4jpxURQw2Fn0FcdpSFXAGTXazcs8Im
IO40GaGPSMwDRAi0/JHmOMRk2qAYXYLjosMgOoFhh0UlirLcYXh7f02dQ9F9AlWU
8ex51bvXAKax6anTDp8K
=b05u
-----END PGP SIGNATURE-----

--qJlmaD5nQCoyKtOLGGEXXWx6D6WO5Yy8j--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 5 Jun 2018 22:53:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 05 18:53:39 2018
Received: from localhost ([127.0.0.1]:35574 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fQKpf-00021a-GM
	for submit <at> debbugs.gnu.org; Tue, 05 Jun 2018 18:53:39 -0400
Received: from mail-io0-f171.google.com ([209.85.223.171]:42676)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fQKpd-00021K-33
 for 31715 <at> debbugs.gnu.org; Tue, 05 Jun 2018 18:53:38 -0400
Received: by mail-io0-f171.google.com with SMTP id r24-v6so5383182ioh.9
 for <31715 <at> debbugs.gnu.org>; Tue, 05 Jun 2018 15:53:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=a08sZonMFqs4dy5lqNjn2NQWfw1HU+sqAvQxPyRfgSQ=;
 b=D23/wuWcReDQKk2xO0uFwO3ga+/AFyIvA4ucg6cesz5NoZLIEsfF14st8/bEwLm0pY
 E9hm+ujhQsrZpN7zATM75OW7O8GzBcXqdkiZFU9cgAa5XGNmr7htrnUDzsWMExePy1Wu
 ZI8uBNFtftWx2DKPjXyUhY3Tc4KV0iSkUHJMyyhh/hmy/qM1wbtMhUTkmVAJH/UXdKBu
 AohB16fW5w/1pl8qmmACeWPBsYvtmU9igyiD/dYif9zCVsj2jOTngo03mGfk6yJ3bEaZ
 IQ71xjA47R3vCLtmmPTuOEYOFSETLbZ1iL5XLRxXiZY7A4SLVdZvfNFUUrbpQlaGiyIk
 D5kA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=a08sZonMFqs4dy5lqNjn2NQWfw1HU+sqAvQxPyRfgSQ=;
 b=qMyEZI4W15iiL2gEewAk792f6CEZc3rtC5LLFUJJXw06qBVPLJjXqIzAafUmKn17gQ
 buTtmEU62zhR6kKs1GOxpMYRrsVqRqjUfRszt9UZO5CGs991oqbx7pVawn1Av/zI3lFP
 L1jSU+BtniuD6T5XteZ+Ykcw/SgtgiMAinVeZSnw8UtO5xmMjd8Tqbrd8EbIlEBCu1xY
 owkjjoYXekCrFePZNS3nGrWTz0Aa/tACszukDNNFCgYfqsVJuaBKIqrHRGu6c9itHWHp
 HJPB2PZQSMdx8NNdk1022pSt3fSVe23ypmR0hcXrSoX6CsMqU/y1bXwVOhEts2DQmEYD
 qVyw==
X-Gm-Message-State: APt69E3jfrD6+YFFVb2KDbX5tsRHllJ1EmTpCsE8+aKxopT7NmFCbFD7
 kvvZK1g2lmfFC8yqoL99KWfhwg==
X-Google-Smtp-Source: ADUXVKJSj3VFBq1ESPG1f+ykHaLCQmJc0LHRzAU7xHM8SQotTEDMZjh8Ql/MYxCY3Cg6AVyA0F7HQA==
X-Received: by 2002:a6b:380b:: with SMTP id
 f11-v6mr598052ioa.105.1528239211420; 
 Tue, 05 Jun 2018 15:53:31 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 h81-v6sm66577ith.2.2018.06.05.15.53.29
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 05 Jun 2018 15:53:30 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel <clement.pitclaudel@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN>
 <871sdm851q.fsf@HIDDEN> <bae46622-25a7-a949-f965-021e8e965b5c@HIDDEN>
Date: Tue, 05 Jun 2018 18:53:29 -0400
In-Reply-To: <bae46622-25a7-a949-f965-021e8e965b5c@HIDDEN>
 (=?utf-8?Q?=22Cl=C3=A9ment?=
 Pit-Claudel"'s message of "Tue, 5 Jun 2018 11:19:22 -0400")
Message-ID: <87k1rc7sly.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: 31715
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)


Cl=C3=A9ment Pit-Claudel <clement.pitclaudel@HIDDEN> writes:

> On 2018-06-04 18:58, Noam Postavsky wrote:
>> X is an optional macro parameter, so the "optionalness" applies at
>> compile time.
>
> I think I see what you mean, but I'm not entirely convinced (in part
> because the docstring doesn't say so, and in part because it doesn't
> seem worth it to break referential transparency: if we accept nil, we
> should also accept a variable that evaluates to nil).

Hmm, not sure if referential transparency makes much sense for macros.

Both SBCL and CLisp throw an error for (let ((x 1) (y nil)) (incf x y)),
although I can't see anything in the Common Lisp spec to decide either
way.  E.g., cltl2 says:

    If delta is not supplied, then the number in place is changed by 1.

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node125.html

>> I think that would approximately double the cost of cl-incf in the
>> simple case.  And since you would expect cl-incf to be used in loops a
>> lot, that seems like a bad idea.
>
> I think we could still optimize the case in which we get an explicit nil.

As I wrote earlier, I was wrong about the optimization thing anyway (I
initially looked at the macro expansion output instead of the byte
compiler output).

> In the rest of Emacs there are lots of other examples.  Many of them
> (for example semantic-find-tags-by-name or calendar-increment-month)
> seem to work when passed a nil-valued variable, but many others behave
> like cl-incf (for example gnus-summary-article-score).

I don't think those are great examples of macros to emulate.
semantic-find-tags-by-name and gnus-summary-article-score look like they
should be (inline?) functions instead of macros.
calendar-increment-month doesn't use make-symbol for proper temp
variable hygiene.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 5 Jun 2018 15:19:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 05 11:19:34 2018
Received: from localhost ([127.0.0.1]:35340 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fQDkE-0004Wk-FF
	for submit <at> debbugs.gnu.org; Tue, 05 Jun 2018 11:19:34 -0400
Received: from mout.kundenserver.de ([212.227.126.134]:34467)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <clement.pitclaudel@HIDDEN>) id 1fQDkC-0004WV-OW
 for 31715 <at> debbugs.gnu.org; Tue, 05 Jun 2018 11:19:33 -0400
Received: from [192.168.1.109] ([73.126.99.55]) by mrelayeu.kundenserver.de
 (mreue006 [212.227.15.168]) with ESMTPSA (Nemesis) id
 0MFn61-1fTmUy3g6n-00Eghg; Tue, 05 Jun 2018 17:19:26 +0200
To: Noam Postavsky <npostavs@HIDDEN>,
 Michael Heerdegen <michael_heerdegen@HIDDEN>
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN> <871sdm851q.fsf@HIDDEN>
From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= <clement.pitclaudel@HIDDEN>
Openpgp: preference=signencrypt
Autocrypt: addr=clement.pitclaudel@HIDDEN; prefer-encrypt=mutual; keydata=
 xsFNBFStGiEBEAC8eHa+DdcrVtDSwYoIgoUtMfRAan4bdLxZuNIASy6iFytCHNsKqfPkq8zD
 YV2+uMtbdcnjapE038nidEMItNhO04JdZ+PJ6jvJo1gW+XI4fM8uzkGZauwR+d3hEq6goFSp
 rIlSlaVf2g5q4OKxI754yqwz00++EZhZQMntzoKQVV9stJ5eQ+gxTT1ANr7wQKbjn/8PM/Cg
 hBZvYLhh+WsS0Ko5qZuWdsvUBLpprmCWkP4FpZ234/tWpdVID65nlHpu25+6ajIcxfCIK+dN
 2br0wN1szTeQFG19cfr3jXEvwHmLQbQqCg4UH+2b7JpMGR2/KWjqRWfWVvZMPVeJdOsZHx53
 k6HIbEhvFBHbmqCI6FAZQjkgzGGkrSD92+jeMYiCTxRKqq2hFZ6xqQ6pJdXD1TXcIYPEs7rA
 MwcNMj8g4e6vuI+2CjHyQQkyMPAEi8guNPnyfBb648f1lxj7JiJu/ehRghIP5u/kLOsHNCKG
 QgCT04sawBZYHqEVYni8oHlGJcdWGT5/UI4B+wn70eXvYSScZEaB+S2s/bD0cdlSpHY5Od3l
 tpRZTva+ydswlrz4fxbYF45s6rFpqVwBMfNv3gqhBFXbuiEEctcTSGqhHxxT4R+24Yn+ZSBa
 EfUbrKnVTUmV20k+57rghiVw2wpj8v7sn3QXt96HJ9ImY4Jvuw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mDgF6E1XlUi0SnNXDV0Us2z4843kEocj8Z6zFNQkuMy0ArQbuxVG0i5jaRaA
 nI6nLB+ouU4UJNUnzrVnVr2sQuruMIIb9u7DVTodwfkrEVw0aoiSW3D7CTATZcBihOo8NZjm
 hze1s8uad9n9PQF+gigV
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
Message-ID: <bae46622-25a7-a949-f965-021e8e965b5c@HIDDEN>
Date: Tue, 5 Jun 2018 11:19:22 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <871sdm851q.fsf@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="fCePl1OUcBPFjIv6VG4DEopCZ8rqFKN1G"
X-Provags-ID: V03:K1:Ngib5aByRcrm0mhY5lpuNgRRXIueNLvABiZxPXhB6U0eYrmLmjw
 SXZBzYC8hWtJly6alp30FUy/P28EpdnEXipCOxvWs5DX9GESe2zZLMUwQ7T0Pe9PQhmjKlJ
 tXajvRwryhs+/zMdXq0+R8/IHlPaFwEATBkuLKb2HW7qMvRBde9C95UEPCZNXKO0ZeQkUIB
 6Jgu7gk+6pk5ElnsSeNMA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:2qj5OIoWMMw=:OSFcgY111dH8IXPy2kwSIM
 /kKpuoX617k8Ynv+YMUvSusHVxslIOb9LA8l0BXYKo0YPm+Czai6itjjIGgkXrmMV19I5HReK
 gCJ5e4tMf1tp/ONc5nQuIcmJgVrHISqaniy2Bb7mNqc073FsszxKWg9M4VHAT7ftoSpbv2Les
 YzItiaFmRxo1kN1qsM0wOyE+mM3h3KNq1ybtXov53dg20bZoPVA0puGCUpFdk0M+uJ0dPlH0j
 7KTrmCRwif+F06vshqOfLCll20dlzv8K7y1CN6Kln7BRfggHTpP7h54gepK3/T0Glg7NCDqI5
 qIvA3Q9OWxdLxeUS/cas5hvkAnS+rgQLRFxTrf5KmPZeTPSrnaDNxdQblhBn0OIfnWqgzLtvh
 A5FK5FH9J760TLL/BqmZiRSD/yQ7e9ZbC4rRfup+WYf8H/EFd+JW69srhufCXVImyu0c3Ed6u
 JMzdVCjACTLQLBsjpd3vAwU3TY6Sa2l3N90tpza7jBXzFwjMNgGwPdwI0tv/V7+CCYjEsWqdJ
 ct/btgu2PUj7YD9tLzanDG7oA1wQ/csSv5FU6uySpyM6ceXD6dL2nxga0U3xyr7tniGqNTnjR
 haOt8Rb98UCC0BJsJIr81C07CSB6DXVrbLJ+sYYsNDxzByjFuZqJBJmW5/p4DKs+lT1h/K9yi
 6hTRdGRY1tUuPeF+MLSnDwvLFO/YN3x5WKnMJS2as64N7V3G8Qe63FhH+wklnfPxMT40=
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 31715
Cc: 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--fCePl1OUcBPFjIv6VG4DEopCZ8rqFKN1G
Content-Type: multipart/mixed; boundary="CGpqY0GUbnSrTc7TvrPAO0WHeHrmvY5XA";
 protected-headers="v1"
From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= <clement.pitclaudel@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>,
 Michael Heerdegen <michael_heerdegen@HIDDEN>
Cc: 31715 <at> debbugs.gnu.org
Message-ID: <bae46622-25a7-a949-f965-021e8e965b5c@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN> <871sdm851q.fsf@HIDDEN>
In-Reply-To: <871sdm851q.fsf@HIDDEN>

--CGpqY0GUbnSrTc7TvrPAO0WHeHrmvY5XA
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable

On 2018-06-04 20:12, Noam Postavsky wrote:
> I couldn't find any other cases of optional parameters in core macros.

I'm not sure which macros count as core macros.  In cl-lib itself there's=
 cl-assert, which seems to behave the same as cl-incf.

In the rest of Emacs there are lots of other examples.  Many of them (for=
 example semantic-find-tags-by-name or calendar-increment-month) seem to =
work when passed a nil-valued variable, but many others behave like cl-in=
cf (for example gnus-summary-article-score).

Cl=C3=A9ment.


--CGpqY0GUbnSrTc7TvrPAO0WHeHrmvY5XA--

--fCePl1OUcBPFjIv6VG4DEopCZ8rqFKN1G
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJbFqn7AAoJEPqg+cTm90wj7YkP/3QdMbTYnxb+PhqSkWDS6uHt
CZbODtAfrsteDX3QPMTd8dUQaP5Hyml+8p3upqRmJhHqJteIKHvIPEkXjTjRzmI5
UGPGFQ2Kknt46Yv6NTxd0BearpNhY3hrkN37njdnjT+KViE0EllMwvGZOzC+fM4k
Q86ZFjT9Fk3qtNtFAjUPlK61+q3qnNmVW/LfUKqAIEMoVmt8w0B/bKdymRm419Mv
BU5KRaCXeT96c5w6tTvaWcf0fbou/Z10qEQqns6FFov301iwXnL+NSfHgxmKa57S
k5SgozTa8yLoLq5GOkZEjPrL5yoZ3pzUXkl+4WCscQB3MRum3bSvOqrXbCDQzfHi
xTEBl7+S/Xy1UFn1j8Vl6/gz61Df1K8FK8T32GPQwz8KsaH2ENA8FQ3ubzjPjHS7
urzLvo2D9sQO1t6tI0J6UzrZoHIOhStbQKh4N4TAiD/dYTldW4v/lMZmm2wTvVlz
Y6fpQAGoZjxyW7n70IWkZoxe06MnB3MjH+MFJJXgRurxhrtGJpVgosDsD0FmMbs2
vK1x1WomzlKrKBfuDoxd3SC9HA8mzMKocGw579M4tqbXwFgxYYiSTFmp+HICC4Ip
IRItT3iuL57sRLIg03/pXK6w+3w8tsixkl5m8DT+YvxfPb3B161Mbs95NkG+KEcA
2D8MyzoVjlbx457rbore
=vT3p
-----END PGP SIGNATURE-----

--fCePl1OUcBPFjIv6VG4DEopCZ8rqFKN1G--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 5 Jun 2018 15:03:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 05 11:03:12 2018
Received: from localhost ([127.0.0.1]:35321 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fQDUO-00048c-Fc
	for submit <at> debbugs.gnu.org; Tue, 05 Jun 2018 11:03:12 -0400
Received: from mout.kundenserver.de ([212.227.126.134]:42477)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <clement.pitclaudel@HIDDEN>) id 1fQDUM-00048G-GT
 for 31715 <at> debbugs.gnu.org; Tue, 05 Jun 2018 11:03:11 -0400
Received: from [192.168.1.109] ([73.126.99.55]) by mrelayeu.kundenserver.de
 (mreue004 [212.227.15.168]) with ESMTPSA (Nemesis) id
 0MXTpy-1fkbuj3Hok-00WZ2R; Tue, 05 Jun 2018 17:03:04 +0200
To: Noam Postavsky <npostavs@HIDDEN>
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN>
From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= <clement.pitclaudel@HIDDEN>
Openpgp: preference=signencrypt
Autocrypt: addr=clement.pitclaudel@HIDDEN; prefer-encrypt=mutual; keydata=
 xsFNBFStGiEBEAC8eHa+DdcrVtDSwYoIgoUtMfRAan4bdLxZuNIASy6iFytCHNsKqfPkq8zD
 YV2+uMtbdcnjapE038nidEMItNhO04JdZ+PJ6jvJo1gW+XI4fM8uzkGZauwR+d3hEq6goFSp
 rIlSlaVf2g5q4OKxI754yqwz00++EZhZQMntzoKQVV9stJ5eQ+gxTT1ANr7wQKbjn/8PM/Cg
 hBZvYLhh+WsS0Ko5qZuWdsvUBLpprmCWkP4FpZ234/tWpdVID65nlHpu25+6ajIcxfCIK+dN
 2br0wN1szTeQFG19cfr3jXEvwHmLQbQqCg4UH+2b7JpMGR2/KWjqRWfWVvZMPVeJdOsZHx53
 k6HIbEhvFBHbmqCI6FAZQjkgzGGkrSD92+jeMYiCTxRKqq2hFZ6xqQ6pJdXD1TXcIYPEs7rA
 MwcNMj8g4e6vuI+2CjHyQQkyMPAEi8guNPnyfBb648f1lxj7JiJu/ehRghIP5u/kLOsHNCKG
 QgCT04sawBZYHqEVYni8oHlGJcdWGT5/UI4B+wn70eXvYSScZEaB+S2s/bD0cdlSpHY5Od3l
 tpRZTva+ydswlrz4fxbYF45s6rFpqVwBMfNv3gqhBFXbuiEEctcTSGqhHxxT4R+24Yn+ZSBa
 EfUbrKnVTUmV20k+57rghiVw2wpj8v7sn3QXt96HJ9ImY4JvuwARAQABzTNDbMOpbWVudCBQ
 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z4843kEocj8Z6zFNQkuMy0ArQbuxVG0i5jaRaA
 nI6nLB+ouU4UJNUnzrVnVr2sQuruMIIb9u7DVTodwfkrEVw0aoiSW3D7CTATZcBihOo8NZjm
 hze1s8uad9n9PQF+gigV
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
Message-ID: <19346ba3-d84a-8da5-bb11-efa7ed933004@HIDDEN>
Date: Tue, 5 Jun 2018 11:03:01 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <874lii88hy.fsf@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="A21yB8HmiflRkXpE9M7qDcBsiZopr8Gan"
X-Provags-ID: V03:K1:RjlGsjJlHUEHnEisftkdpmNHvQJ4oyjMZk8ff0OlkAPhMfbkPop
 gbf+wvb/bjY6i5FBwhsN1C5VtyHQhJnQHcWboTx8nPEMy8LaCgVlKeu7oHLt7a3bpChFgGh
 UTp5UK8UPYpIsloAV7toYyYzGS4uC2SosjWTzp723KWJcD+ldlMeThAHf4U2BrpOCE956l8
 Ug45KODupwXLX6G11pwuw==
X-UI-Out-Filterresults: notjunk:1;V01:K0:u3J/HHmGK30=:QPi5VqJWLqjf+KFj26Eij9
 erhsvE3ya6R10VuwfrySgMfN1dhL+q73M5SllybbQEkeB6T2vM35rjuFJs6i93BTLpJnMU6fx
 OJaOH76U5V35zkJDyRKlhJeB82fvoFqBSAqoaZRfTCdS7PQqX3DJ9XQ/8faPf1/G97jWl5Euo
 cwPRx5yBTOHkYTRfY6M+X5Qps0AxmjW7Jc5rJlW/s99omVsGM5xLYnGzSGim/YwylvtoT3hTg
 c9XyHRLi4Yi21YRWAQVZVhb9dzWCQuFcTzFtzWJg4e2B1900UsA6MLtdPhKYc92ABzJidMLpA
 sp9yXdU9oNHMUwMZjUIONYyu73k9g0w9eEsGgVI8N2G2BWQaxkMR+tnJDGACJKWpeK2Tf2xEl
 4pywoGjh0wjzxmKCF6hOObUFC09tPDiz0Q2yBgLWzEY/JDbIZsTogWijO/U+Yv7nfx9Ze2HWU
 ueYXZGjUubrf4cD7FEfjaPu1CqQzxLbPH42UQDqgMWuH5kXo4QBXXDNY+ZAPbMtdjInHSgj6/
 Qz6uAwmZinUiHBYrHD7gO9Rs2W2lGsHTnLWkrSpwQ6QgCTAv92I6O3bKFYTcIlpFaNlTMp2S+
 dA7jAcP6LCmsqbos+JlT896r0JxppdCr2uoQXtvEyVwZA339OsD6LM+/s07bzf3rztqwJ21jA
 jHuhv009hYWv0kdECP2KQIgBGCuoaJLTqhTuKkE2pmmS5LU0BXMpkxtwPTTYwrcQT3as=
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 31715
Cc: 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--A21yB8HmiflRkXpE9M7qDcBsiZopr8Gan
Content-Type: multipart/mixed; boundary="E7MFySNTLJja05o6xaBibDGZV6dPaDzl0";
 protected-headers="v1"
From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= <clement.pitclaudel@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Cc: 31715 <at> debbugs.gnu.org
Message-ID: <19346ba3-d84a-8da5-bb11-efa7ed933004@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN>
In-Reply-To: <874lii88hy.fsf@HIDDEN>

--E7MFySNTLJja05o6xaBibDGZV6dPaDzl0
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable



On 2018-06-04 18:58, Noam Postavsky wrote:
> X is an optional macro parameter, so the "optionalness" applies at
> compile time.

I think I see what you mean, but I'm not entirely convinced (in part beca=
use the docstring doesn't say so, and in part because it doesn't seem wor=
th it to break referential transparency: if we accept nil, we should also=
 accept a variable that evaluates to nil).

> I think that would approximately double the cost of cl-incf in the
> simple case.  And since you would expect cl-incf to be used in loops a
> lot, that seems like a bad idea.

I think we could still optimize the case in which we get an explicit nil.=


Cl=C3=A9ment.


--E7MFySNTLJja05o6xaBibDGZV6dPaDzl0--

--A21yB8HmiflRkXpE9M7qDcBsiZopr8Gan
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJbFqYlAAoJEPqg+cTm90wjyycP/294FHQSsckfzAfhnz+FAVdf
kPvJcqg0BNMTsyx6RrqmeR3t9sIJ6zs16GsCZMstQSgCDV0VQ9NKN0vEA79w3Lcc
cgHpLWG/ZOmI3jqb8hBEDD3b6SpHK/GzIiwBAs3kUZoIaSpXHE7wM4+9bRJfbNNk
YK1x3sbuKqFQKZN+wtWdZAU+BhjqMn5BpJ+3S2czE/UWzDEhLFIyNTAYjrOyem0O
KO1aMy1o202QrSphfSxgvvG6XeQ/T3EsML+rf8pWt5bfQiYdYkxdw0shXbE3cgZc
SLnmKTm5XwBVGtOGAU2FzH9gJueAXu9YBrEWcMxYSwa8zvJ73tlbbhCkxrDHn5et
fhEESukEbH9M6vDeKgpgvlyf8GFfb0DvqTdA5N8fwcwldlwKkMkLMRtNNOi59MZf
lf8SSy2sMXnIMkLC/+85rJLGPSZdMAXHtFxxR0Z/actXQ9VDGdYjGfsWdnrQu5BA
XWVt7dIjukTCo8AbtBgWnT2qKeTXNL2YSy8FVavjeyXRYBUsfFWTRWvwgufqsSol
PFvHcrFPuS85q8n4sfXyYV89ML96O7XrE4fYG0j4R4RgNpgDyWIH26CUcE5NSupm
x5ZDmcI3adPANq0SDf78zClzQzSFFcHCNGRWS6sddR5nu12YssNEIQIxCfniKKx6
eOoHJUYPG+lJ1ePM5Tit
=Y34t
-----END PGP SIGNATURE-----

--A21yB8HmiflRkXpE9M7qDcBsiZopr8Gan--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 5 Jun 2018 00:40:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 04 20:40:17 2018
Received: from localhost ([127.0.0.1]:33749 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fQ01J-0005PR-Md
	for submit <at> debbugs.gnu.org; Mon, 04 Jun 2018 20:40:17 -0400
Received: from mout.web.de ([212.227.15.4]:60497)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1fQ01I-0005PC-BH
 for 31715 <at> debbugs.gnu.org; Mon, 04 Jun 2018 20:40:16 -0400
Received: from drachen.dragon ([188.110.196.170]) by smtp.web.de (mrweb003
 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LwqHA-1gNCGu29zU-016SKc; Tue, 05
 Jun 2018 02:40:08 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN>
 <871sdm851q.fsf@HIDDEN>
Date: Tue, 05 Jun 2018 02:40:07 +0200
In-Reply-To: <871sdm851q.fsf@HIDDEN> (Noam Postavsky's message of "Mon, 04
 Jun 2018 20:12:33 -0400")
Message-ID: <87vaay3w2g.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:WtdlUfL7KRkLD8JcdjtR9RlR4g480ATY0zuX4fQBIKHHSffqtPI
 HWjQhIRp9ID7CtgTJ2afQaqVuouN7zCekJ1nMPHHhG38KsiR4tN9eAqjpy25dUesTB2JDUG
 XXUfPvIzQYoSx6qImF2uOXskcSte71NL9PCTgQF+AhVNxaWoFDar/FUlJshhY6soDjja3DV
 Fd33KFWbZa/IKPlnQO0JA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:BqVFbCwxORc=:aKAZ3otZgOFAApdslv3xpx
 nX00k/jwewAkRWVn6VPSHdZRKwhmAdNocd3DcolAlhM6uek7jVXX9ANwgc3kmYRh3acDSXJhU
 6earA+pHhhB37Jjl5lFqvxmMb15v0piEAz/X3BOjnu0PV0QjWmeXkJ/HAmfJnqNKnrXoOKZkR
 1Ym776bxnxapU2Nz4/dJxH11NkJoUESlfZzVP8I5j+oxrH+vqOB3vEX9UvX886KuwzcDB0ec5
 ijqrhOtulbsGQZ1rBOtn6tJ3+3xkyVKzor6xzp18WRuNf+T8pcM7KzEIwKcXBaF162pty4BoB
 CN4cOfKMIOrS+TfRMab1YJDbXekFkaEiozQhQeKx1hBGAhg1vRREDZQKewKaZOkkRxOVpzPe1
 BLHt4cHru1WEKOe1dEp9nGrQDDGNj2TeSdlsFIr6DxO0EOrMBQeK1NH1cGgPRc8+bt98Ch42Z
 0rUX95SNaESqCJnYV+KJkncGOizu0065N5lSaT0HUIssxdbSVoIBKU+ubfElf6BA2sM4+eyuM
 u3ePhFjSmVLZUj/NdRSO44XKtcLkdGd3Lshz7Ohqn/QgGY97a8CrsmbCQr1K+5FNJR9oeunuw
 rWsb/4wCpCED+eas47x9qhiWtI4a+LaCKBexLa5lYjcxq0PgSsXRwO/RDXUS4qezILWFcRt6I
 DcmLl2exPIMWUE8OKzvfONr1+IuAFmUMXh2JigFw5Frb2RBSEFs0WnPEN5OG1k3nmxYpquW60
 PZ7i6CW5IaM+ixToU3yrycsdz7PRbPHnybi9SJMWuDkNEBONxt3yPCtNZguLoNebQunx5yiJ8
 63qanCU
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31715
Cc: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel <clement.pitclaudel@HIDDEN>,
 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Noam Postavsky <npostavs@HIDDEN> writes:

> Do DOCSTRING and DECL count?
>
>     (defun NAME ARGLIST &optional DOCSTRING DECL &rest BODY)
>
> Since they're obviously not evaluated, it doesn't quite feel the same.

Yes, not really.

It's not that super clear.  If we keep the current definition (though I
would rather like to see this fixed if possible), maybe consider to add
something like "If X is specified, it should be an expression that
should evaluate to a number".


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 5 Jun 2018 00:12:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 04 20:12:43 2018
Received: from localhost ([127.0.0.1]:33728 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fPzad-0004ia-EB
	for submit <at> debbugs.gnu.org; Mon, 04 Jun 2018 20:12:43 -0400
Received: from mail-io0-f177.google.com ([209.85.223.177]:37354)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fPzab-0004iN-Gs
 for 31715 <at> debbugs.gnu.org; Mon, 04 Jun 2018 20:12:41 -0400
Received: by mail-io0-f177.google.com with SMTP id s26-v6so1150789ioj.4
 for <31715 <at> debbugs.gnu.org>; Mon, 04 Jun 2018 17:12:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=uRy8hXmOzAO0cvhUgffDIJmN0YOHBGMKlrBrTTVYXlQ=;
 b=dsDlRIIcpxQ+pU/zvwZbUgfbQtryjzWTdOGUHrq3pS4rxjNtGIELkHFzUwLFbtyolq
 16CPCPDxKEhhU2E51u6bm6Milpmzrkgpq92hp7yj+bLXp6Hp38LwqKkMMTOm9jJ+NDtf
 0ZKDoqJ6r2STnCyVJjaCNQC0UQPczodOV0yi+HoOhw/vmgGL7+CwRkfsigsxb+pIU5HV
 BDa+UH3tyvT2DWIAaKrwJhws+44zFf34ceCPEuVyjPRLDrsIHrJtw1xEqyj0mVSx0BCy
 KChzdnvnnFivtOZkRg80l5nCzsDRiS46XUCR5P0vMWcCHbE59TALeF6HQQs7kIf/cITo
 huVw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=uRy8hXmOzAO0cvhUgffDIJmN0YOHBGMKlrBrTTVYXlQ=;
 b=Kw/SITghTNSJglm7iaDkr9HzuniAfRne2RaqY3085qa2tIttp9X+f0XFRGCKIY6LnA
 1m4vIS6MR1C1Lz1p3K/BBOcxl095gL0MlvH6eo+UPZbUPZMuZp1FQk/plnN8KRPpRE6Q
 xF1fKnAEPDDk1RtxvedOru0ZgUWBOzuaMBPOGkbDtbAgwO1b88iUMryxLgednCXceyR3
 eR26fwRP22dGfnhBZESrAilwgdDw1DEtDwyPjS5pK50++WA8ua3Jtk3LRRk+IlLL47fb
 Ly3/eUB+/vic0Z5PtcVyLbrbdsUUWVQkwUYbTr0qsjgk30oBgvUBKMZS9nrrqshLHr3c
 vS4Q==
X-Gm-Message-State: APt69E2T1gn6xjW4qHxu/TMAL8Lb6XJsDD4i2m3MvCZdM95Pt5dre1za
 sjjidWqYJ5bS4BduDUlu+hzHPA==
X-Google-Smtp-Source: ADUXVKLxQTwRsHbL90ebvxponK9eo7P4sh8PIEFXIDLERKcAU0RMwFtBED1Y8lwxmitOnhO29DS/Hg==
X-Received: by 2002:a6b:c309:: with SMTP id
 t9-v6mr10553169iof.157.1528157555990; 
 Mon, 04 Jun 2018 17:12:35 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 e139-v6sm334153ite.1.2018.06.04.17.12.34
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 04 Jun 2018 17:12:35 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN> <87o9gqw21y.fsf@HIDDEN>
Date: Mon, 04 Jun 2018 20:12:33 -0400
In-Reply-To: <87o9gqw21y.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 05
 Jun 2018 01:43:21 +0200")
Message-ID: <871sdm851q.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: 31715
Cc: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel <clement.pitclaudel@HIDDEN>,
 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Noam Postavsky <npostavs@HIDDEN> writes:
>
>> X is an optional macro parameter, so the "optionalness" applies at
>> compile time.
>
> Are you sure we always treat optional macro parameters like this?

Do DOCSTRING and DECL count?

    (defun NAME ARGLIST &optional DOCSTRING DECL &rest BODY)

Since they're obviously not evaluated, it doesn't quite feel the same.
I couldn't find any other cases of optional parameters in core macros.

There is the special form defvar's INITVALUE, but that is treated even
more specially, since it distinguishes nil from omitted.

>> I think that would approximately double the cost of cl-incf in the
>> simple case [...]

Actually, checking again, I seem to be wrong about this; the compiler
knows to elide the extra test if the increment is a constant expression,
so it would only add runtime when incrementing by a computed amount.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 4 Jun 2018 23:43:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 04 19:43:33 2018
Received: from localhost ([127.0.0.1]:33722 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fPz8P-00044u-2g
	for submit <at> debbugs.gnu.org; Mon, 04 Jun 2018 19:43:33 -0400
Received: from mout.web.de ([217.72.192.78]:56921)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1fPz8N-00044h-Nr
 for 31715 <at> debbugs.gnu.org; Mon, 04 Jun 2018 19:43:32 -0400
Received: from drachen.dragon ([188.110.196.170]) by smtp.web.de (mrweb103
 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MZlR4-1fj9NM2vxm-00LVG0; Tue, 05
 Jun 2018 01:43:22 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 <874lii88hy.fsf@HIDDEN>
Date: Tue, 05 Jun 2018 01:43:21 +0200
In-Reply-To: <874lii88hy.fsf@HIDDEN> (Noam Postavsky's message of "Mon, 04
 Jun 2018 18:58:01 -0400")
Message-ID: <87o9gqw21y.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:F7kip4wQckcqJtkmUGa2sW3LvbflHBFUfQtDj8NiaquzLvsF5C6
 qes3PF9dkRQyWqGK23PXpHofaWufQljzggYhhnAkzNVpDf899chm9HbJGgMjfcZzcJvlo7w
 D4DMfQ3o0u5fQms3EU1JEVpH67/ODGouxJv2S1XwVFftTAOgm/W0OfFczm3kwiRlUZy12Sy
 YljcjWcGMSEKrU/L8qodg==
X-UI-Out-Filterresults: notjunk:1;V01:K0:CAONRUIMw+Y=:DMZfhaWxUODzi/UPRx2FXd
 Z2nXw2mIdCV9OHO483TC0R9lxf00Gu2szbAeUp4yddWW8vKW8V9cuPqCJ7fOPQ8PJkMfCInhZ
 9mFufoGcJlnh+RqvmrDlkNrRlxlopitFgYsOZ57xAgsDPPF1mk++2/jxv4bJYgjKh9fHl9S+/
 YoqIfwTa5QIABJ1E4QO7o6uyVODMJ2y4oRIWWAh5MqEzSgETvFMCRQZt02Gt5BkIcjLgGX1O+
 ZzRdp1WIoEl8/WIYXOxQDcBcQocLDRofxKvnY9snONpEm6ORER0WSkWh8GHF/AfawSAvqnKA7
 KFrb4OEm7h9WwjSBG93wRJcwDGfY2f2gyd11+v7uB93Fb2UGcg+TnAskLpvmk1FgkpV3gBBm6
 H+4YSK6uD0qvT8v2yjWGcsrc/qRRQ+7HaQ2/3ZIX1aUZPZzfiLN2uWzPA6hNXNZCs2JOzvVjn
 CK//MN2F81YEfUwNfUEuGVuYfyHZJoQ3Zhv1VnrMn0ecs/V+J65W2Jj8CM+sOkVOdMf2HfTo1
 7VuK98CJYuNpmVPjkY2xSsbqDi7P1Qku3Oqo53V7z3pFl1M7l80RtOtwgcbTL8xzdqFIjVxyT
 NZpU4AQn4T+N39YnrI0rwWiqaRb0durmofkMtrypK+YNNp1qPovXQWB9UxKE0LZtOVgCpQbzt
 AbZSKgNfFj20WSCeg080bFsxdAWzVteCkpd/63Tw1vqY53pa8onQVRieY8534eBmnv+0MveNI
 CIONVPD5RNcy4C/T7rb2jLtRKX6siiYJ29/1GtyRGJgidks3RZG/gZUgg0JSNQno07cd89Cdi
 MLBR/1c
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 31715
Cc: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel <clement.pitclaudel@HIDDEN>,
 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Noam Postavsky <npostavs@HIDDEN> writes:

> X is an optional macro parameter, so the "optionalness" applies at
> compile time.

Are you sure we always treat optional macro parameters like this?

> I think that would approximately double the cost of cl-incf in the
> simple case [...]

We could drop the optimization in case an X expression is specified,
resulting in one additional `or' call:

(defmacro cl-incf (place &optional x)
  (if (and (symbolp place) (not x))
      (list 'setq place (list '1+ place))
    (list 'cl-callf '+ place (or x 1))))

Would that be significantly slower than the current definition?


Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at 31715 <at> debbugs.gnu.org:


Received: (at 31715) by debbugs.gnu.org; 4 Jun 2018 22:58:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 04 18:58:11 2018
Received: from localhost ([127.0.0.1]:33706 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fPyQV-00031e-6r
	for submit <at> debbugs.gnu.org; Mon, 04 Jun 2018 18:58:11 -0400
Received: from mail-io0-f170.google.com ([209.85.223.170]:37601)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1fPyQT-00031Q-QL
 for 31715 <at> debbugs.gnu.org; Mon, 04 Jun 2018 18:58:10 -0400
Received: by mail-io0-f170.google.com with SMTP id s26-v6so986819ioj.4
 for <31715 <at> debbugs.gnu.org>; Mon, 04 Jun 2018 15:58:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=opYVatSslr8WQkpUTuzfg2/jmb+MHi02RVB8L0MaPpw=;
 b=SXsMLc7Af9wT6GTTZoF58io86fTUbL6M6aGAUdFgag3j410KPQXVj6GvpgG555d+8Q
 MTIrLXry9Ea44M1u2HMMBpD0BS3AlOWy9NYBvBHDxtMKm0W84S0QvdT1q8PmZ921YczZ
 CitsnfzA/7A0V7/1dRds3ZhTxFzYwB7DKd8v+SbyoSoEHUw8O4x7zZCwpVxHQQeDZG2a
 WISXQ2ypuHNs8FBYouXWkBN0JIesfsYOotF2OT3PNScFIog+EBnpsnSEPp5+Cft4geUE
 jn9f6oAg0Nv6xAxtyPuFa9FJzlHUmt3a2TM8zANy8tRYzhxXvbFO2NsCnSOA199WYcOK
 8PwQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=opYVatSslr8WQkpUTuzfg2/jmb+MHi02RVB8L0MaPpw=;
 b=WfWNUSaxNgo7vffIl+rJRU7Ats78lJK/g+frSvOWYfXTorcLvMlGSw7zWOLBLT0Oi7
 bNlksPh+LhCuCZQnbpVWYKVLf3cGcuX9u4WQV/m1tMbkZ/rd0fJvHQ7XRWpTpG+z8mGG
 iyKny1VvXrmES91oRV1nC8zQ89P27VR5nIxbD+xHq3A/qde6ioNMaN77dqPxbAlbEkk/
 lV0nOBcot9HXX9ptqDprzSvypQIJv/dJvhlbGvGJ3UBZSx9qTIKtHiat/DElUzUxeWco
 iwOxqp4p7mZNwDpc9grZETbvgy16gSc4UMsbkuEOme84yLpVXTSYLTbePJdM5Kf951ty
 UHaw==
X-Gm-Message-State: ALKqPwfA9BNEwaVNUSCQo9uCXl91cUxwZ7y6z0ZUZ/3B3U+cxIAn658s
 cUS27hwJVKYvnOqxrxXRPE7+1Q==
X-Google-Smtp-Source: ADUXVKKUkj0KgbSBVFZng6ayZAAF93gBQ9Fz+dEMz7Z848OLMqqZQnksSCMCnUGB9A2t/TnfRFII9g==
X-Received: by 2002:a6b:8f84:: with SMTP id
 r126-v6mr15754063iod.233.1528153083920; 
 Mon, 04 Jun 2018 15:58:03 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 w8-v6sm5057986iof.84.2018.06.04.15.58.03
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 04 Jun 2018 15:58:03 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel <clement.pitclaudel@HIDDEN>
Subject: Re: bug#31715: cl-incf and cl-decf error out when passed a nil-valued
 variable as 'offset'
References: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
Date: Mon, 04 Jun 2018 18:58:01 -0400
In-Reply-To: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
 (=?utf-8?Q?=22Cl=C3=A9ment?=
 Pit-Claudel"'s message of "Mon, 4 Jun 2018 16:06:55 -0400")
Message-ID: <874lii88hy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: 31715
Cc: 31715 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.8 (-)

Cl=C3=A9ment Pit-Claudel <clement.pitclaudel@HIDDEN> writes:

> The following works:
>   (let ((x 1)) (cl-incf x nil))
>
> =E2=80=A6 but following raises "setq: Wrong type argument: number-or-mark=
er-p, nil":
>   (let ((x 1) (y nil)) (cl-incf x y))
>
> =E2=80=A6 yet the docs say this, which suggests that both should work:
>   (cl-incf PLACE &optional X)
>   Increment PLACE by X (1 by default).

X is an optional macro parameter, so the "optionalness" applies at
compile time.

> The issue comes from the expansion of cl-incf:
>
>     (defmacro cl-incf (place &optional x) =E2=80=A6
>       (if (symbolp place)
>           (list 'setq place (if x (list '+ place x) (list '1+ place)))
>         (list 'cl-callf '+ place (or x 1))))
>
> Shouldn't that `if x' check be quoted?  Same for the second branch of the=
 if (shouldn't the `(or x 1)' part be quoted, too?)

I think that would approximately double the cost of cl-incf in the
simple case.  And since you would expect cl-incf to be used in loops a
lot, that seems like a bad idea.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Jun 2018 20:07:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 04 16:07:12 2018
Received: from localhost ([127.0.0.1]:33662 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fPvl2-0007UM-55
	for submit <at> debbugs.gnu.org; Mon, 04 Jun 2018 16:07:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60684)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <clement.pitclaudel@HIDDEN>) id 1fPvl0-0007U8-2Y
 for submit <at> debbugs.gnu.org; Mon, 04 Jun 2018 16:07:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <clement.pitclaudel@HIDDEN>) id 1fPvku-00084t-2x
 for submit <at> debbugs.gnu.org; Mon, 04 Jun 2018 16:07:04 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43812)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <clement.pitclaudel@HIDDEN>)
 id 1fPvkt-00084g-Ut
 for submit <at> debbugs.gnu.org; Mon, 04 Jun 2018 16:07:04 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51654)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <clement.pitclaudel@HIDDEN>) id 1fPvks-0005jG-TR
 for bug-gnu-emacs@HIDDEN; Mon, 04 Jun 2018 16:07:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <clement.pitclaudel@HIDDEN>) id 1fPvkp-00083s-Ou
 for bug-gnu-emacs@HIDDEN; Mon, 04 Jun 2018 16:07:02 -0400
Received: from mout.kundenserver.de ([212.227.126.135]:45629)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <clement.pitclaudel@HIDDEN>)
 id 1fPvkp-00083V-DI
 for bug-gnu-emacs@HIDDEN; Mon, 04 Jun 2018 16:06:59 -0400
Received: from [192.168.1.109] ([73.126.99.55]) by mrelayeu.kundenserver.de
 (mreue002 [212.227.15.168]) with ESMTPSA (Nemesis) id
 0M7hEO-1gCEzJ1RpI-00vKk1 for <bug-gnu-emacs@HIDDEN>; Mon, 04 Jun 2018
 22:06:57 +0200
To: bug-gnu-emacs@HIDDEN
From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= <clement.pitclaudel@HIDDEN>
Openpgp: preference=signencrypt
Autocrypt: addr=clement.pitclaudel@HIDDEN; prefer-encrypt=mutual; keydata=
 xsFNBFStGiEBEAC8eHa+DdcrVtDSwYoIgoUtMfRAan4bdLxZuNIASy6iFytCHNsKqfPkq8zD
 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kQ3kgZXPaa6890kPe3eRqyf9iOYpcAWu71TSqQldaOZ1Nl2Ttk
 1JY8UQARAQABwsFfBBgBAgAJBQJUrRohAhsMAAoJEPqg+cTm90wjqucP/3di/s4HIltDHvte
 Css8JYINdfkdfkt5ub75YLoBa5blPIMJ/E5HMiQ90dAnIlg0ZQ39AOJ0agyg7vNSi199Y1Kn
 3TSpAAiTo5V8ry8CuyqJ+0t4czr5PUr6P+8ggFAXMSn5NbZPQHZRods3GFtO5pq/6gwWxBiO
 6VcLEqeEdz+ZzusISIPtuz56biaeR5+lh3FVITvXzVHY/7mXeKKb/HKy4gwHmNnWAqrELjg1
 vtTtJJnPyrTUE6vYzO1pfNs7ynfcylV5q6oloLNwChQweMfFtDHOiOv6wweLav43+28WAElD
 Saw618yT8fFSWYGl9tUmADoRgHfFrcHrcZ0v/27C4Gh/bbESUJqm4ik1wZPrEjIwSZJFAm5k
 2wTlRMnuxT7cGZVYChG2awk5wbYqofwivGcpY1X+HSGivYXEGQmvPSdONFbgr1FUDXKgcsbw
 qsxaBtx407fDL8ohnWnsjqB0X6sWUjllm8Afxabwr2WCzdRut6/HIXcrFHIFjzHokIqartiO
 0J0tmANHEACjmDgF6E1XlUi0SnNXDV0Us2z4843kEocj8Z6zFNQkuMy0ArQbuxVG0i5jaRaA
 nI6nLB+ouU4UJNUnzrVnVr2sQuruMIIb9u7DVTodwfkrEVw0aoiSW3D7CTATZcBihOo8NZjm
 hze1s8uad9n9PQF+gigV
Subject: cl-incf and cl-decf error out when passed a nil-valued variable as
 'offset'
Message-ID: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
Date: Mon, 4 Jun 2018 16:06:55 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.8.0
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="g41CYoQ3EiLOI9q89TdRqHtussPys8tyN"
X-Provags-ID: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.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--g41CYoQ3EiLOI9q89TdRqHtussPys8tyN
Content-Type: multipart/mixed; boundary="P0M1ZakTnw3uHWl4Xf9PzX9ktkUiOkb3K";
 protected-headers="v1"
From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= <clement.pitclaudel@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Message-ID: <1dff07f6-8da4-4e4c-a700-0bc39d6f2aa6@HIDDEN>
Subject: cl-incf and cl-decf error out when passed a nil-valued variable as
 'offset'

--P0M1ZakTnw3uHWl4Xf9PzX9ktkUiOkb3K
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable

Hi all,

The following works:
  (let ((x 1)) (cl-incf x nil))

=E2=80=A6 but following raises "setq: Wrong type argument: number-or-mark=
er-p, nil":
  (let ((x 1) (y nil)) (cl-incf x y))

=E2=80=A6 yet the docs say this, which suggests that both should work:
  (cl-incf PLACE &optional X)
  Increment PLACE by X (1 by default).

The issue comes from the expansion of cl-incf:

    (defmacro cl-incf (place &optional x) =E2=80=A6
      (if (symbolp place)
          (list 'setq place (if x (list '+ place x) (list '1+ place)))
        (list 'cl-callf '+ place (or x 1))))

Shouldn't that `if x' check be quoted?  Same for the second branch of the=
 if (shouldn't the `(or x 1)' part be quoted, too?)

cl-decf has the same issue.  Am I missing something?

Cl=C3=A9ment.


--P0M1ZakTnw3uHWl4Xf9PzX9ktkUiOkb3K--

--g41CYoQ3EiLOI9q89TdRqHtussPys8tyN
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJbFZvfAAoJEPqg+cTm90wjrR8QAIyPpZ3trAXYlHrPmry0vY/t
j0a7yXNmxNrmQIgAdir3rxRGimwQPtSFUq/LklssF0Eg+WKhV9oprct4Pi+Uol00
f0PenLzl2OWCpjxuqUmgwYovOcnZdjQp6fwrqlRnUJSJhLuhC96fwvCuL56//I1S
IqDsHYkBmZgmSVN49Qh//MonUnu1IYOhkdskJfFlusdaOFFXs+HJ3fXP7UgnyuS7
MAFPjD5m0RWeHy3jS8CQobQx/uqfZw+lr3krbwxfiIYRuONFX+ph+7+mvKSHyaIv
5q9p7JboXPKCQgpl1ZIhq+akJ8bH5b9IQmCMugVoak9sw+06XHj87ZFywnWL+tHW
BFOrOgbtjFB07XPwb5Y/EvHyr3xLcaYKslj0McMI3jPeylD0RqSoMWsoAPRyJ9F5
C2ycFFae/BG65Xyoku1QK8jAegbjFXb2RYER4aFhid4xXGB3XdwMIVGLQEIWANY6
qeBcIQKSyf2pqeG1F+havJycxCOz/1dVyA1RINxRMV59Gk1TJ8f0VHsQUD3pP16T
j2JaXuWBfov6alNEdDn44jQDGEVD/NDgtRE0UqXmI9+QPWtD75/00f3hPG1UA+oS
nXJw+dqDdSu+tx5QdSjHrpcZNgiwRRLfeUJkdv+3Az89dLcfSftb+7YKQDTwE6Ck
GvosG++dN4qZiEW8FCSh
=Pc5x
-----END PGP SIGNATURE-----

--g41CYoQ3EiLOI9q89TdRqHtussPys8tyN--




Acknowledgement sent to Clément Pit-Claudel <clement.pitclaudel@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#31715; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 6 Jun 2018 22:30:02 UTC

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