Function: tool-bar--flush-cache

tool-bar--flush-cache is a byte-compiled function defined in tool-bar.el.gz.

Signature

(tool-bar--flush-cache)

Documentation

Remove all cached entries that refer to the current tool-bar-map.

Source Code

;; Defined in /usr/src/emacs/lisp/tool-bar.el.gz
(defun tool-bar--flush-cache ()
  "Remove all cached entries that refer to the current `tool-bar-map'."
  (let ((id (sxhash-eq tool-bar-map))
        (secondary-id (and secondary-tool-bar-map
                           (sxhash-eq secondary-tool-bar-map)))
        (entries nil))
    (maphash (lambda (k _)
               (when (or (equal (cdr k) id)
                         (equal (cdr k) secondary-id))
                 (push k entries)))
             tool-bar-keymap-cache)
    (dolist (k entries)
      (remhash k tool-bar-keymap-cache))))