From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Rafael D Sorkin Newsgroups: gmane.emacs.bugs Subject: bug#27016: possible bug in `defsetf' Date: Thu, 25 May 2017 00:59:08 -0400 Message-ID: References: Reply-To: Rafael D Sorkin NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1495688421 12303 195.159.176.226 (25 May 2017 05:00:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 25 May 2017 05:00:21 +0000 (UTC) Cc: 27016@debbugs.gnu.org, Rafael D Sorkin , npostavs@users.sourceforge.net To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 25 07:00:12 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 1dDkse-0002wD-1v for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 May 2017 07:00:12 +0200 Original-Received: from localhost ([::1]:58198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDksg-0004pe-DG for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 May 2017 01:00:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDksa-0004o1-1H for bug-gnu-emacs@gnu.org; Thu, 25 May 2017 01:00:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDksV-0008Qq-6G for bug-gnu-emacs@gnu.org; Thu, 25 May 2017 01:00:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34150) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dDksV-0008NV-0w for bug-gnu-emacs@gnu.org; Thu, 25 May 2017 01:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dDksU-0003to-N3 for bug-gnu-emacs@gnu.org; Thu, 25 May 2017 01:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rafael D Sorkin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 May 2017 05:00: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.149568835614901 (code B ref 27016); Thu, 25 May 2017 05:00:02 +0000 Original-Received: (at 27016) by debbugs.gnu.org; 25 May 2017 04:59:16 +0000 Original-Received: from localhost ([127.0.0.1]:36827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDkrk-0003sH-1p for submit@debbugs.gnu.org; Thu, 25 May 2017 00:59:16 -0400 Original-Received: from mail-oi0-f97.google.com ([209.85.218.97]:34965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDkrh-0003ry-N9 for 27016@debbugs.gnu.org; Thu, 25 May 2017 00:59:14 -0400 Original-Received: by mail-oi0-f97.google.com with SMTP id w10so22691290oif.2 for <27016@debbugs.gnu.org>; Wed, 24 May 2017 21:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perimeterinstitute.ca; s=google; h=reply-to:from:to:cc:subject:in-reply-to:message-id:date; bh=qWaFB2NR8lvhGnZsPLaxC8+uy3zhFNs4qMX487S+9Nw=; b=E4OTwKFPcGo1LPq72QGPdm6rMKqIbKFfSjbLxVJpEP7GR2e3mO39JrZWLur4fAJisD INFEt0kJCJTLC8vB8Z0sZYY35evvEvHH0jvU/vxpCE67wc2j6B05fJwWsGwlifOg51Ji D6vCEbdSqbiTSzOjKfyxPhg2Vpg4eMe6x13hM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:from:to:cc:subject:in-reply-to :message-id:date; bh=qWaFB2NR8lvhGnZsPLaxC8+uy3zhFNs4qMX487S+9Nw=; b=hCjUOirmx2U148If4Itu+HT94c/69hrlShuQ9FHYagMqrja1K5wrZqly7jucN8Rboh qnV38fP6XWQVsMyb+gRTqqfUArBlxw2LV6aYCCqocCva6BvAMd2jjbTZ6JxbmjdHy/ih 42wi1NIGD0rbTZ+zb/+XZ2pQewGiyR2xI/1KBbhiBZkGPQ5T/Ea9jBR+OzDkCupim/7T qPf+HXTjfAeuI+vv+RCg01W0id8jsx3+dxL6ryo5FTEcoo1jj3VZSqfHkMA7JvgRCFuK bMeuuZrDHaCyZL+Vvgdq7kByleuP9O+jz7aCjw5neSfhHF62xDpO+zlhGXsp2w+1FGRW mpvw== X-Gm-Message-State: AODbwcC8XxfP+jmxRfJ19OkGPkaJ4u3B6GoJGnD+kWHKMqQdXOJ78wGg Kwfd3XLaqnQHomfcAlulQMEAEp+mtDbyV4ifo1fY X-Received: by 10.55.97.76 with SMTP id v73mr34989129qkb.241.1495688347015; Wed, 24 May 2017 21:59:07 -0700 (PDT) Original-Received: from mail.perimeterinstitute.ca ([38.104.158.162]) by smtp-relay.gmail.com with ESMTP id 6sm969515qkx.2.2017.05.24.21.59.06; Wed, 24 May 2017 21:59:07 -0700 (PDT) X-Relaying-Domain: perimeterinstitute.ca Original-Received: from mars.pi.local (mars.pi.local [10.10.7.6]) by mail.perimeterinstitute.ca (Postfix) with ESMTPS id 1D606C007B; Thu, 25 May 2017 01:08:23 -0400 (EDT) Original-Received: from rsorkin by mars.pi.local with local (Exim 4.69) (envelope-from ) id 1dDkrc-00078r-Cp; Thu, 25 May 2017 00:59:08 -0400 X-Mailer: MH-E 8.2; nmh 1.2; GNU Emacs 23.1.1 In-reply-to: your message of Thu, 25 May 2017 00:51:37 +0200 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:132815 Archived-At: > > I had a defsetf inside a conditional in a file that was to be > > loaded and/or compiled and then loaded. (Compilation isn't > > really the issue.) Before loading that file I set a "switch" > > which the conditional referred to. That way a defsetf done > > before loading the file could be either overridden or not, as > > desired. > > Can't you just `defsetf' unconditionally to a named function, > and change that function's definition when appropriate (in a > conditional)? > > > Michael. Thanks for the suggestion, Michael. I think it would work, but the function I'm aliasing to is `symbol-value', and I would feel slightly uncomfortable to insert an intermediate function which would have to either call `symbol-value' or be redefined to be it. Fortunately, I hadn't used defsetf inside a conditional more than a couple of times, and for those it was easy to devise adequate workarounds (once I understood what the problem was). For the future, I have resolved to use `defsetf' only at top level. - Rafael ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- Rafael Sorkin Perimeter Institute for Theoretical Physics 31 Caroline Street North Waterloo, ON N2L 2Y5 Canada ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-