From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#43397: 28.0.50; Adding tool bar items: update tool bar Date: Tue, 03 May 2022 13:53:21 -0400 Message-ID: References: <87h7s0jurl.fsf@gmail.com> <83lfhb83hm.fsf@gnu.org> <874kban5vm.fsf@gnus.org> <87tuj9io2e.fsf@gnus.org> <87sfpqws8m.fsf@gnus.org> <87y1zivbr9.fsf@gnus.org> <87ilqmvaco.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40184"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 43397@debbugs.gnu.org, Eli Zaretskii , Caio Henrique To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 03 19:54:21 2022 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 1nlwj7-000AEy-5q for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 May 2022 19:54:21 +0200 Original-Received: from localhost ([::1]:36404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlwj5-0007DG-PB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 May 2022 13:54:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlwio-00076h-SZ for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 13:54:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlwin-0005P5-Qe for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 13:54:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlwin-0001cd-KL for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 13:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 May 2022 17:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43397 X-GNU-PR-Package: emacs Original-Received: via spool by 43397-submit@debbugs.gnu.org id=B43397.16516004106194 (code B ref 43397); Tue, 03 May 2022 17:54:01 +0000 Original-Received: (at 43397) by debbugs.gnu.org; 3 May 2022 17:53:30 +0000 Original-Received: from localhost ([127.0.0.1]:40982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlwiI-0001bq-JX for submit@debbugs.gnu.org; Tue, 03 May 2022 13:53:30 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:36034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlwiH-0001bb-0v for 43397@debbugs.gnu.org; Tue, 03 May 2022 13:53:29 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8EDA5100006; Tue, 3 May 2022 13:53:23 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2561810029F; Tue, 3 May 2022 13:53:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1651600402; bh=sj/6zp1GLUnskY7UZ8OZ0GGAArJ1/1b4sbLF/Ls01Ck=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=DMm/FpKt5o7BGpy+t3dLogsm5NPPMe87xMQj2Jy6I4P/Jz1+sIervPVjUDPTDoeDU z0d6SJAd9BBWQctzEIT1sML41NSUrTYsuRyzrLFatE0DVJjKb+YG+//95zqUR9GOX5 gY2dWuIJTZKp4gME5p56dX6Hm6cGnre3m9PMialb6C7pAy0qAFM1CMH0ulj6kBZy4Z v8BMw6cIXt8zIOTKzBsCsZvZYmoSXWS6/J4vSX3IA14JyndogUJZY5i2eFvFxiCcnY x71hdstjTKQ5/KtFA+pJ+Li9Urfv/ARyZW9vWLqjHWOd6j6LpKsKoiI3uBqzjevb4V O347KTLiQhXBw== Original-Received: from alfajor (unknown [45.44.229.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E950E120697; Tue, 3 May 2022 13:53:21 -0400 (EDT) In-Reply-To: <87ilqmvaco.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 03 May 2022 18:39:51 +0200") 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:231348 Archived-At: Lars Ingebrigtsen [2022-05-03 18:39:51] wrote: > Stefan Monnier writes: >> `tool-bar-map` is a normal keymap, which we modify in the usual way, >> i.e. via side-effect. So the key we place in this `equal` hash table >> will be routinely modified via side-effect, thus changing its sxhash. > Hm... I assumed that that was the point, really, but that it didn't > work for... reasons... I.e., whenever somebody modifies the map, the > cache is supposed to be refreshed. I don't understand why that didn't > work, but it doesn't. Since the key is stored as-is in the hash table, modifying the key and looking it up again should find it its hash value is unchanged, and the `equal` test will return t since both the in-hashtable key and the lookup-key are one and the same object. In any case side effects on a key's stored in an `equal` hash table lead in general to the hash table having an inconsistent internal state, so they should be avoided as much as possible. [ Just like using `aset` on the `symbol-name` of an interned symbol, for the same reason. ] Stefan