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: Fri, 26 May 2017 18:51:21 -0400 Message-ID: <87h9075j12.fsf@users.sourceforge.net> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1495839014 7871 195.159.176.226 (26 May 2017 22:50:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 26 May 2017 22:50:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: 27016@debbugs.gnu.org, Rafael D Sorkin To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 27 00:50:10 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 1dEO3e-0001v1-0j for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 May 2017 00:50:10 +0200 Original-Received: from localhost ([::1]:38806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEO3j-0008PW-CV for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 May 2017 18:50:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEO3Z-0008Mg-VE for bug-gnu-emacs@gnu.org; Fri, 26 May 2017 18:50:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dEO3W-00009m-Mw for bug-gnu-emacs@gnu.org; Fri, 26 May 2017 18:50:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37000) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dEO3W-00009g-KB for bug-gnu-emacs@gnu.org; Fri, 26 May 2017 18:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dEO3W-0000et-7C for bug-gnu-emacs@gnu.org; Fri, 26 May 2017 18:50:02 -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: Fri, 26 May 2017 22:50:02 +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: wontfix Original-Received: via spool by 27016-submit@debbugs.gnu.org id=B27016.14958389942513 (code B ref 27016); Fri, 26 May 2017 22:50:02 +0000 Original-Received: (at 27016) by debbugs.gnu.org; 26 May 2017 22:49:54 +0000 Original-Received: from localhost ([127.0.0.1]:39677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dEO3O-0000eO-KZ for submit@debbugs.gnu.org; Fri, 26 May 2017 18:49:54 -0400 Original-Received: from mail-it0-f68.google.com ([209.85.214.68]:34042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dEO3L-0000e5-BA; Fri, 26 May 2017 18:49:52 -0400 Original-Received: by mail-it0-f68.google.com with SMTP id d68so2723726ita.1; Fri, 26 May 2017 15:49:51 -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=DET72faV0Ho7YqI9Z/4EA5jWo84nXldl/y8aLj7LCFk=; b=WaFcu/Uw/OnP7GWFwaEK8ICRUwOT8glwbbc5hlAUpEpf/3wDQiTCegFBd3m3rHHlCY XIQ4ZrnIivCBYOVT0WTZ5fBYSuEaVhHzkISUcww83movMr0Y0g90Ih8j0rWrflgPy7YK tbQ0gWXQob+9L82Zaw96lcr1R84nSJk/kJlFcFR+NJa+V4AaZzNa6kjuvdAWUzBFlj8q AnjxEL7SYFFkD193BdvL7Y8E/VgER36Qkqt21LpXSwFnzyviF8kVE0G3W9xskcymtwWF dY5J3j5ABiLwHqZpNjEIr0wYX7EIK/EkRpSDxFoKzqbo0/+BGnf5aIfy8YknIbPhibbA Wcdw== 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=DET72faV0Ho7YqI9Z/4EA5jWo84nXldl/y8aLj7LCFk=; b=U5zPDJ91aOSld/lnb1Rf5VNxXYxOg1ynLzgPg5ledwCcLbjxf4JekCGdQRpY33HKl8 9ylQsLgwe6yHMV4JJp89qnTx7dwyFhofSg8ucXUxJs+RPWbm0mDEpZV8uNgLYa/Ob+Co qGLhrhN/lubtfKYksPAO3EfcpSWV7qQy5hEUZuGT9nzgx80iTPIAoEdcvIJBtDyrKXA2 vhlxZSsd1hCphcpV02ODqQwdnHtiWjFrTf6szJvG5nydddzH7ugECdwHqSQ1gnBUUH+D vgmLH4r8nPTedwwq1Xg1qxuvnFLhoFOCwf7wFxV94HPR/DwQsFeiSl7i5iLNPFg3wk11 FPPQ== X-Gm-Message-State: AODbwcBcjnoIEnDZxuxGYyAsg1rsfqBgUME7Z84mbV5M0VhWDSt3sAB3 189aT3/IIYlDO4R1 X-Received: by 10.36.245.132 with SMTP id k126mr19809803ith.43.1495838985432; Fri, 26 May 2017 15:49:45 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id i6sm5020785iti.20.2017.05.26.15.49.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 May 2017 15:49:44 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Thu, 25 May 2017 23:50:54 -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:132899 Archived-At: reopen 27016 tag 27016 - wontfix quit Stefan Monnier writes: >> (unless t >> (defalias 'foobar 'cons) >> (defsetf foobar setcar)) ; nil >> (foobar pair) ; same as above >> (setf (foobar pair) 0) ; 0 ! > > I can confirm that it's a bug. It's perfectly correct for the defsetf > to be macroexpanded, but not to be evaluated. > Not sure how best to get that behavior. The naive/straightforward way > might be to introduce some sort of eval-and-compile-when-at-toplevel, > but there's probably a better way. The first thing to do is to look at > how it was done in Emacs-23. Is the difference in Emacs-23 not just eager macroexpansion? Both the Emacs-23 and the current code seem to expand to (put 'foobar ...).