From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#27016: possible bug in `defsetf' Date: Mon, 22 May 2017 17:18:32 -0400 Message-ID: <87efvgfv4n.fsf@users.sourceforge.net> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1495488360 18336 195.159.176.226 (22 May 2017 21:26:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 May 2017 21:26:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 27016@debbugs.gnu.org To: Rafael D Sorkin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 22 23:25:56 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCupv-0004ex-V3 for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 May 2017 23:25:56 +0200 Original-Received: from localhost ([::1]:45006 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCuq1-0001Hn-Fj for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 May 2017 17:26:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCuiK-0004F4-W6 for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 17:18:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCuiH-0002NA-Re for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 17:18:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58890) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCuiH-0002N6-OS for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 17:18:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dCuiH-000778-Jv for bug-gnu-emacs@gnu.org; Mon, 22 May 2017 17:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 May 2017 21:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27016 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: unreproducible Original-Received: via spool by 27016-submit@debbugs.gnu.org id=B27016.149548782327279 (code B ref 27016); Mon, 22 May 2017 21:18:01 +0000 Original-Received: (at 27016) by debbugs.gnu.org; 22 May 2017 21:17:03 +0000 Original-Received: from localhost ([127.0.0.1]:33333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCuhL-00075r-6J for submit@debbugs.gnu.org; Mon, 22 May 2017 17:17:03 -0400 Original-Received: from mail-it0-f54.google.com ([209.85.214.54]:38384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCuhI-000759-VK; Mon, 22 May 2017 17:17:01 -0400 Original-Received: by mail-it0-f54.google.com with SMTP id r63so5901739itc.1; Mon, 22 May 2017 14:17:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=M98C3Yy88Y40uot4zEYCc91cquWaaA4wSHuFkMsanL0=; b=C3LHelXtVLScS/Q71NJt1yy2HraVsO4knmopg6kdlk/Fc7oUjEBYVS0Y373XpK1J5C 7yOBPFol8GaGKv1IiPU3OrM9ZuI5K7O+x1wgxC9jUmpLKmXRIBlwS5g46W/QzoZsvM6H Te4Vnw3IyA8kSavbZvqxpVpHwYFyQlswsfcv+maYH3KcS7gkGCN8m7/F+q8//yeTgrUr H9q1OtsJpFUZDaSXRw/At9GgKKPfbMQF+J0ht7HxE0D/a3/eOvlVVeAP6eknQ2gP0CrY B+OcCV9Kf/aeGBwM+Cf0mJCbL+J8DbzBw/IfWejZ3MrBixFwxsWoXIlCniwCd+bmRfPZ KAcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=M98C3Yy88Y40uot4zEYCc91cquWaaA4wSHuFkMsanL0=; b=sUrMsmcRqSL+v0GoaGCNBi3HGKFzzljBzNeWpVPVWCy4xQ6zJAm8qwdAzuWTOd3qOP msvHAp11wTsi30hr3VUPb1p6D2WhmkOIOPPwvzSFOC2KjgbYbtJhCcADH2hyRvVPtph6 bKj4ViyPERthLKDHt1Z9gjz+nPmZJnIZYXk+W4mXEvfS4XZL4t9GZ4Vzuw0mYky2W0vP rZimzuZi4u4F3L7jjLS4ORToS0JGNW95Kx5MdJdDpZ5+VpxoB+TgouqLZcoHw3RP6V96 43u004UINxAdaprRyurogFdIOoe52Zj0/wLk4NgjnLDynQqbI+DKvKUeHtYkroqkfnjo RizA== X-Gm-Message-State: AODbwcDZF9w5NRtIwWsaebK4mE7R91ic+XduGHRb45E/BJ1OYeExALRa 4RMDwV91eQyOQw== X-Received: by 10.107.146.68 with SMTP id u65mr10624575iod.154.1495487815149; Mon, 22 May 2017 14:16:55 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id e34sm7885564iod.18.2017.05.22.14.16.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 May 2017 14:16:54 -0700 (PDT) In-Reply-To: (Rafael D. Sorkin's message of "Mon, 22 May 2017 16:25:14 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:132745 Archived-At: tags 27016 - unreproducible found 27016 24.4 found 27016 25.2 quit Rafael D Sorkin writes: > Following your suggestion I tried starting with "emacs -Q" and > got the same results as you did. However if I (require 'cl) > then the bug returns. (I normally require CL automatically on > starting emacs.) So perhaps it's an incompatibility between CL > and the new way that defsetf is implemented. Oh, right, I see it now. It happens in 24.4 and later. I'm not sure it's a bug though. My guess is that the difference is eager macroexpansion. When I compile, then I get the same behaviour with 24.3 (that's my earliest working Emacs build) as well. $ emacs -Q -batch -l cl -f batch-byte-compile bug-27016-defsetf.el In toplevel form: bug-27016-defsetf.el:1:1:Warning: cl package required at runtime bug-27016-defsetf.el:3:1:Warning: global/dynamic var `pair' lacks a prefix Wrote /home/npostavs/src/emacs/bug-27016-defsetf.elc $ emacs -Q -batch -l bug-27016-defsetf.elc pair: (0 . 4) where bug-27016-defsetf.el has contents: (require 'cl) (defvar pair nil) (setq pair (cons 3 4)) ; (3 . 4) (unless t (defalias 'foobar 'cons) (defsetf foobar setcar)) ; nil (setf (foobar pair) 0) ; 0 ! (message "pair: %S" pair)