Mercurial > hg > xemacs-beta
diff src/keymap.c @ 489:4a8bb4aa9740
[xemacs-hg @ 2001-04-30 08:49:24 by martinb]
hash table mapping
author | martinb |
---|---|
date | Mon, 30 Apr 2001 08:49:26 +0000 |
parents | 5aa1854ad537 |
children | 7039e6323819 |
line wrap: on
line diff
--- a/src/keymap.c Sat Apr 28 21:04:50 2001 +0000 +++ b/src/keymap.c Mon Apr 30 08:49:26 2001 +0000 @@ -2990,8 +2990,7 @@ (function, keymap, sort_first)) { /* This function can GC */ - struct gcpro gcpro1, gcpro2, gcpro3; - Lisp_Object table = Qnil; + struct gcpro gcpro1, gcpro2; /* tolerate obviously transposed args */ if (!NILP (Fkeymapp (function))) @@ -3000,17 +2999,9 @@ function = keymap; keymap = tmp; } - - GCPRO3 (function, keymap, table); + GCPRO2 (function, keymap); keymap = get_keymap (keymap, 1, 1); - - /* 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), + map_keymap (XKEYMAP (keymap)->table, !NILP (sort_first), map_keymap_mapper, LISP_TO_VOID (function)); UNGCPRO; return Qnil;