From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#31792: 27.0.50; Regression in #'labels, recent versions Date: Tue, 12 Jun 2018 18:58:29 -0400 Message-ID: <87k1r3y5m2.fsf@gmail.com> References: <5b1f.0188.5dc11.f21c@parhasard.net> <878t7kzyqs.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1528844227 28646 195.159.176.226 (12 Jun 2018 22:57:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 12 Jun 2018 22:57:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 31792@debbugs.gnu.org, Stefan Monnier To: Aidan Kehoe Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 13 00:57:03 2018 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 1fSsDm-0007LZ-Dr for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jun 2018 00:57:02 +0200 Original-Received: from localhost ([::1]:58773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSsFt-0006qb-Eo for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Jun 2018 18:59:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSsFl-0006n2-LQ for bug-gnu-emacs@gnu.org; Tue, 12 Jun 2018 18:59:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSsFi-0000dE-KP for bug-gnu-emacs@gnu.org; Tue, 12 Jun 2018 18:59:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37597) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSsFi-0000d2-Dv for bug-gnu-emacs@gnu.org; Tue, 12 Jun 2018 18:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fSsFi-0004kd-1g for bug-gnu-emacs@gnu.org; Tue, 12 Jun 2018 18:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jun 2018 22:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31792 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31792-submit@debbugs.gnu.org id=B31792.152884431918232 (code B ref 31792); Tue, 12 Jun 2018 22:59:01 +0000 Original-Received: (at 31792) by debbugs.gnu.org; 12 Jun 2018 22:58:39 +0000 Original-Received: from localhost ([127.0.0.1]:45494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSsFK-0004jv-Tk for submit@debbugs.gnu.org; Tue, 12 Jun 2018 18:58:39 -0400 Original-Received: from mail-it0-f50.google.com ([209.85.214.50]:50372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSsFJ-0004je-4e; Tue, 12 Jun 2018 18:58:37 -0400 Original-Received: by mail-it0-f50.google.com with SMTP id u4-v6so1441217itg.0; Tue, 12 Jun 2018 15:58:37 -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=2ZkFAWA51U10UI3ampUKbEzZVy5aIHpwYH+ncCw34r8=; b=Ui7NRBDx4pH7Lo2GzjtDVuYtVokinNbIsh4y6PVj5MUMSOlTONWtabNPrRhHvRD97O w0QsiQTWn3JNm813kuucSmjZ28eBL4qBbe9V2l9Uc93FCXG9+m0kkhLxE7HhvOfqxW7W Q98uBzSiedbDogMlllIJzCxuqyqsnlP/dZyTjtAWsKm+EZaTuUuHmOPCDEx+hs0fZ5VW GGvUFn9qNwHtxM86pyAaw35zuLKRpemmdUKI1bPYXt1XbLhJqmAoUctQ2Y6Kx7G7all0 zFQEFYlE5W20zwUtolmHeOlVGmqxUDtUWWzrLKQVAU6ZbFU4HzFsQlNM9l680HlA2c12 RiGA== 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=2ZkFAWA51U10UI3ampUKbEzZVy5aIHpwYH+ncCw34r8=; b=bNP1FaL0MWAuK+oE4dcUVI536KhdllfGsy0gLu4l7MjqSuboypCiwRdEfz6bdnKQqh ge3jZqjgYjlPcDx3i2EjaxlWW7zenbcn7X1X9qYvDY5cp27J0vkKiidAoTe33xhL2TKN FQeAu1tFyL3pu8B9ZHpKmS1jKoF6UI9ZgWD5gnBsCy22FqvnTbtXFoWPi5TBqpW4cq+n QAcFMRHGRgw30fauUahAagG9j6nGOII71pcwqLuQrhS9MNjsvcINJ2+X8bS8IeQw6QCo fa4oQCr4o3O6hUReYbk/kqQJLrZzgLcP84/OXdu9Mre8dnDK4S5GO9cs/CLzu/2MxbZY 8SQQ== X-Gm-Message-State: APt69E39g0yqOFcTT2b8NxpioxVhJjS9DjIuDoV8YWefneDrrqMDCqec JvA6W4pWvB4PZAFapUuWqRNFNQ== X-Google-Smtp-Source: ADUXVKJvKEu8lwUqQ9J+xI6zm/xaTIEyn6EgO6jtr9eYkmfEtd1finduU9EFhGJe5DR732/d2Pmuzw== X-Received: by 2002:a24:d309:: with SMTP id n9-v6mr2644022itg.6.1528844311520; Tue, 12 Jun 2018 15:58:31 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id z68-v6sm540251ioz.79.2018.06.12.15.58.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Jun 2018 15:58:30 -0700 (PDT) In-Reply-To: <878t7kzyqs.fsf@gmail.com> (Noam Postavsky's message of "Mon, 11 Jun 2018 19:31:39 -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:147343 Archived-At: --=-=-= Content-Type: text/plain tags 31792 + patch quit > Seems to have regressed in Emacs 25, cl-labels still works correctly. > Here's a smaller reproducer: > > (labels ((foo () t)) > #'foo) ;=> foo > > (cl-labels ((foo () t)) > #'foo) ;=> (lambda nil t) It looks like `labels' missed the update in [1: 69f36afa11], here's a patch to apply it. It's not immediately clear to me if the requirement to use a backquoted lambda vs closure is based on using lexical scoping where the macro is defined or where it's used, so I left that as is. Should be fine for emacs-26, I think. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-fun-handling-inside-labels-Bug-31792.patch Content-Description: patch >From aa197176d0de4a6b7d1ee5d16d0fc1750f7237cf Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Tue, 12 Jun 2018 18:41:46 -0400 Subject: [PATCH] Fix #'fun handling inside `labels' (Bug#31792) * lisp/emacs-lisp/cl.el (labels): Apply the equivalent of the cl-labels change from 2015-01-16 "* lisp/emacs-lisp/cl-macs.el: Fix last change". --- lisp/emacs-lisp/cl.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index d53c8e0bbc..85deb8cb4f 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -466,8 +466,9 @@ labels (push var sets) (push (cons (car binding) `(lambda (&rest cl-labels-args) - (cl-list* 'funcall ',var - cl-labels-args))) + (if (eq (car cl-labels-args) cl--labels-magic) + (list cl--labels-magic ',var) + (cl-list* 'funcall ',var cl-labels-args)))) newenv))) (macroexpand-all `(lexical-let ,vars (setq ,@sets) ,@body) newenv))) -- 2.11.0 --=-=-= Content-Type: text/plain [1: 69f36afa11]: 2015-01-16 17:49:00 -0500 * lisp/emacs-lisp/cl-macs.el: Fix last change. https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=69f36afa11c0b754c40f4fc57408ccd85428e2b0 --=-=-=--