X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fkeymap.c;h=430acdcd6cac2d6a3f57c4c05cf54736427baa21;hb=c055fb9d54088bf2dff25f6be1a033ff0cea5f92;hp=2b5a18ef078b628fcbfa5e83d88e2a6222424bbe;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git- diff --git a/src/keymap.c b/src/keymap.c index 2b5a18e..430acdc 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -285,9 +285,16 @@ print_keymap (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) write_c_string (buf, printcharfun); } +static const struct lrecord_description keymap_description[] = { + { XD_LISP_OBJECT, offsetof(Lisp_Keymap, parents), 6 }, + { XD_LISP_OBJECT, offsetof(Lisp_Keymap, name), 1 }, + { XD_END } +}; + /* No need for keymap_equal #### Why not? */ DEFINE_LRECORD_IMPLEMENTATION ("keymap", keymap, mark_keymap, print_keymap, 0, 0, 0, + keymap_description, Lisp_Keymap); /************************************************************************/ @@ -742,7 +749,7 @@ static Lisp_Object make_keymap (size_t size) { Lisp_Object result; - Lisp_Keymap *keymap = alloc_lcrecord_type (Lisp_Keymap, lrecord_keymap); + Lisp_Keymap *keymap = alloc_lcrecord_type (Lisp_Keymap, &lrecord_keymap); XSETKEYMAP (result, keymap); @@ -1134,6 +1141,7 @@ copy_keymap_internal (Lisp_Keymap *keymap) new_keymap->sub_maps_cache = Qnil; /* No submaps */ new_keymap->table = Fcopy_hash_table (keymap->table); new_keymap->inverse_table = Fcopy_hash_table (keymap->inverse_table); + new_keymap->default_binding = keymap->default_binding; /* After copying the inverse map, we need to copy the conses which are its values, lest they be shared by the copy, and mangled. */ @@ -4319,7 +4327,7 @@ Incremented for each change to any keymap. staticpro (&Vcurrent_global_map); - Vsingle_space_string = make_pure_string ((CONST Bufbyte *) " ", 1, Qnil, 1); + Vsingle_space_string = make_string_nocopy ((CONST Bufbyte *) " ", 1); staticpro (&Vsingle_space_string); }