From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.bugs Subject: bug#47992: [External] : bug#47992: 27; 28; Phase out use of `equal` in `add-hook`, `remove-hook` Date: Sun, 25 Apr 2021 00:38:25 +0200 Message-ID: <090f8bd5-368c-5684-85e1-65420049d47a@daniel-mendler.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12163"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "47992@debbugs.gnu.org" <47992@debbugs.gnu.org>, "jakanakaevangeli@chiru.no" To: Stefan Monnier , Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 25 00:39:20 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1laQvn-00033I-Sy for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Apr 2021 00:39:19 +0200 Original-Received: from localhost ([::1]:60756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laQvm-0001E3-Vx for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Apr 2021 18:39:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laQvW-0001C4-IO for bug-gnu-emacs@gnu.org; Sat, 24 Apr 2021 18:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58348) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1laQvW-0008TL-B5 for bug-gnu-emacs@gnu.org; Sat, 24 Apr 2021 18:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1laQvW-0003qF-8f for bug-gnu-emacs@gnu.org; Sat, 24 Apr 2021 18:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Apr 2021 22:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47992 X-GNU-PR-Package: emacs Original-Received: via spool by 47992-submit@debbugs.gnu.org id=B47992.161930391914738 (code B ref 47992); Sat, 24 Apr 2021 22:39:02 +0000 Original-Received: (at 47992) by debbugs.gnu.org; 24 Apr 2021 22:38:39 +0000 Original-Received: from localhost ([127.0.0.1]:41661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laQv8-0003pe-TY for submit@debbugs.gnu.org; Sat, 24 Apr 2021 18:38:39 -0400 Original-Received: from server.qxqx.de ([178.63.65.180]:60783 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laQv5-0003pO-4D for 47992@debbugs.gnu.org; Sat, 24 Apr 2021 18:38:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZmBxNQLuZrpwEo1DB6s8fx8EDLqCKYbKlPvkCvNV3DY=; b=rOkMOP/8/CbrWRQSDPcGmM8bxk 5Q7zV+xyT8YLfTnVpJmQqpZmzNZxustwoBH6ixlGxsxDklQi4snrnC4C77+Et3zH9iLNpwLmX0FBc HEVEGgE9gmEiEpoVe9FEpdL275g/gzijcMR96qpIl1z9ZMmkNd75WCaLqDO0w2jHhwNY=; In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:204830 Archived-At: On 4/25/21 12:30 AM, Stefan Monnier wrote: >> Perhaps `equal' can be fixed to do something better with closures? > > There's no magic: `equal` has to check the structural equality, so it > has to recurse through the whole structure, including all the > closed-over variables to which it refers. Well, structural equality on closures is an arbitrary choice. One could simply refuse to compare closures structurally and treat them as opaque objects. The structural equality does not even perform alpha conversion. This is probably due to how binding works in Elisp? (equal (lambda (x) x) (lambda (y) y)) Daniel