+
+ /* elisp_maphash does not allow mapping functions to modify the hash
+ table being mapped over. Since map-keymap explicitly allows a
+ mapping function to modify KEYMAP, we map over a copy of the hash
+ table instead. */
+ table = Fcopy_hash_table (XKEYMAP (keymap)->table);
+
+ map_keymap (table, !NILP (sort_first),