Flush the tool bar cache on all terminals when adding new entries
* lisp/tool-bar.el (tool-bar--flush-cache): Flush the cache for the current tool bar on all terminals.
This commit is contained in:
parent
4c9a7010bc
commit
d2913901dc
1 changed files with 9 additions and 1 deletions
|
@ -95,7 +95,15 @@ functions.")
|
|||
(cons (frame-terminal) (sxhash-eq tool-bar-map)))
|
||||
|
||||
(defun tool-bar--flush-cache ()
|
||||
(setf (gethash (tool-bar--cache-key) tool-bar-keymap-cache) nil))
|
||||
"Remove all cached entries that refer to the current `tool-bar-map'."
|
||||
(let ((id (sxhash-eq tool-bar-map))
|
||||
(entries nil))
|
||||
(maphash (lambda (k _)
|
||||
(when (equal (cdr k) id)
|
||||
(push k entries)))
|
||||
tool-bar-keymap-cache)
|
||||
(dolist (k entries)
|
||||
(remhash k tool-bar-keymap-cache))))
|
||||
|
||||
(defun tool-bar-make-keymap (&optional _ignore)
|
||||
"Generate an actual keymap from `tool-bar-map'.
|
||||
|
|
Loading…
Add table
Reference in a new issue