From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#43397: 28.0.50; Adding tool bar items: update tool bar Date: Tue, 03 May 2022 18:39:51 +0200 Message-ID: <87ilqmvaco.fsf@gnus.org> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23022"; 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: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 03 18:51:05 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 1nlvjs-0005kC-Gz for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 May 2022 18:51:04 +0200 Original-Received: from localhost ([::1]:54270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlvjr-0003mW-Bo for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 May 2022 12:51:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlvaA-0003AW-J6 for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 12:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46954) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlvaA-0003ZL-9v for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 12:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlvaA-0005iM-2z for bug-gnu-emacs@gnu.org; Tue, 03 May 2022 12:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 May 2022 16:41:02 +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.165159600721875 (code B ref 43397); Tue, 03 May 2022 16:41:02 +0000 Original-Received: (at 43397) by debbugs.gnu.org; 3 May 2022 16:40:07 +0000 Original-Received: from localhost ([127.0.0.1]:40851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlvZH-0005gk-4T for submit@debbugs.gnu.org; Tue, 03 May 2022 12:40:07 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:57346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlvZE-0005g9-M1 for 43397@debbugs.gnu.org; Tue, 03 May 2022 12:40:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=1UprG6qCR+e79QUoTd8K/1lS72Ns7JkaXdd3GX4jJtk=; b=Xp1187qy1yaf0QZ/5C6l6HDyJc DIw2q3GVglWk7mhWZJq025CIPkHPgrfrItNL9cjPgz8cq//52iNm5PX8scXoiyVD9rlo/fkzXQzsz gV+c4pnLxg0fYMl1z3XVjawCanqUhSfPTGJvGEtkxVm0do0OY2hcf1xKMfYAPYemWz1c=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nlvZ4-0008Ky-03; Tue, 03 May 2022 18:39:56 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAGFBMVEUuLCNGRDdmYlSC fG2Nh3gMCQm+t6j///9hzOHLAAAAAWJLR0QHFmGI6wAAAAd0SU1FB+YFAxAhIpNFhdYAAAGZSURB VDjLdZLBbsIwDIbdae15rVTOow08AOs4Dwg9pxHmDKj4/R9htpsWRrMIJchf/99ObIA8z4uKV8M/ G9ZhswE3gmUKSWP3eSHk6wHqFSIam6IzKplAUyI6++MQvEgGIAIroL+wrOuFCGBB3Shor3+AGNmW AbY33jxRP4LaWkpZQT3KzstCJ6CxREcNjYAYFJWxLdFFTVLdBzAIiHOciL4RzwEUnIEF8i2H7hNI iqqRuNSz1eM0Kmox2rMAF+o4Jq9MSzcJywXVMeEIW4nTEOdLq6P+YWDpiuPKxk8GcMfZ4hx1u1vN wRo4U4kx0JkdRoE3xxjI4M3GnNBD8hmLowMvlZcxwLWa/h+wpjICZDq2s7t34JcyBbMKTtA1h495 UZ3cvKV+P+ZIwnnm19UGUnjHdXj2TDqoIGTP7k9gmgUJhHMhw2BUMnhk/UNRPCfJrlNyyAevQXEO PfDE016pVwiE6pyAQmY3JHWhXGzBJbkM72XWWgcqOUaASJrVC1gwEImJApG8duodEFQSB0lexAHM gQdUyRz8Am3mQYD9DGS6AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIyLTA1LTAzVDE2OjMzOjM0KzAw OjAwAHFWYwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMi0wNS0wM1QxNjozMzozNCswMDowMHEs7t8A AAAASUVORK5CYII= X-Now-Playing: Deutsch Amerikanische Freundschaft's =?UTF-8?Q?=5FF=C3=BCr?= Immer_: "Verlieb Dich in mich" In-Reply-To: (Stefan Monnier's message of "Tue, 03 May 2022 12:31:08 -0400") 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:231340 Archived-At: 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. > Maybe we'd be better off using an `eq` hash table and manually flushing > the corresponding entry whenever `tool-bar-map` is modified by > side-effect. Yup. Should be faster, too. > I also see that we use a `:weakness t` but the values stored there will > usually not be stored anywhere else, so the hash table will be > completely flushed at every GC (and partly refilled soon after as part > of redisplay). Yeah, that's true, too. But if we have flushing, then we can probably make it non-weak, because we'll get rid up the values that way. > It should have `:weakness 'key` instead (but without > fixing the current bug report, this will cause the keymap to never be > refreshed until we manually flush the hash table ;-). I added flushing in one of the interface functions -- I didn't know whether any needed it, but they probably do. I'll poke around a bit. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no