all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 43397@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>,
	Caio Henrique <caiohcs0@gmail.com>
Subject: bug#43397: 28.0.50; Adding tool bar items: update tool bar
Date: Tue, 03 May 2022 18:39:51 +0200	[thread overview]
Message-ID: <87ilqmvaco.fsf@gnus.org> (raw)
In-Reply-To: <jwvtua6mw1x.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 03 May 2022 12:31:08 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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





  reply	other threads:[~2022-05-03 16:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14 14:30 bug#43397: 28.0.50; Adding tool bar items: update tool bar Caio Henrique
2020-09-14 21:44 ` Caio Henrique
2020-09-15 15:27 ` Eli Zaretskii
2020-09-15 20:05   ` Stefan Monnier
2020-09-16  2:26     ` Eli Zaretskii
2021-08-27 17:40   ` Lars Ingebrigtsen
2021-08-27 22:04     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-28 15:30       ` Lars Ingebrigtsen
2022-05-03 15:28         ` Lars Ingebrigtsen
2022-05-03 15:41           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-03 16:09             ` Lars Ingebrigtsen
2022-05-03 16:19               ` Lars Ingebrigtsen
2022-05-03 16:49                 ` Eli Zaretskii
2022-05-03 16:50                   ` Lars Ingebrigtsen
2022-05-03 16:31               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-03 16:39                 ` Lars Ingebrigtsen [this message]
2022-05-03 16:46                   ` Lars Ingebrigtsen
2022-05-03 16:54                     ` Eli Zaretskii
2022-05-03 16:57                       ` Lars Ingebrigtsen
2022-05-03 17:53                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-03 18:58                     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilqmvaco.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=43397@debbugs.gnu.org \
    --cc=caiohcs0@gmail.com \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.