# HG changeset patch # User Karl Heuer # Date 819565827 0 # Node ID 28790743a5a3ab27d07641361467432c25ad52ac # Parent 197ada59560544e66690c534fcebb84674b335e9 (Fkey_binding): Handle text-property keymaps. Include puresize.h. (store_in_keymap): Check PURE_P (def) and copy if nec. diff -r 197ada595605 -r 28790743a5a3 src/keymap.c --- a/src/keymap.c Thu Dec 21 17:08:30 1995 +0000 +++ b/src/keymap.c Thu Dec 21 17:10:27 1995 +0000 @@ -27,6 +27,7 @@ #include "keyboard.h" #include "termhooks.h" #include "blockinput.h" +#include "puresize.h" #define min(a, b) ((a) < (b) ? (a) : (b)) @@ -405,8 +406,7 @@ { /* If we are preparing to dump, and DEF is a menu element with a menu item string, copy it to ensure it is not pure. */ - if (!NILP (Vpurify_flag) && CONSP (def) - && STRINGP (XCONS (def)->car)) + if (CONSP (def) && PURE_P (def) && STRINGP (XCONS (def)->car)) def = Fcons (XCONS (def)->car, XCONS (def)->cdr); if (!CONSP (keymap) || ! EQ (XCONS (keymap)->car, Qkeymap)) @@ -931,6 +931,8 @@ } else { + Lisp_Object local; + nmaps = current_minor_maps (0, &maps); /* Note that all these maps are GCPRO'd in the places where we found them. */ @@ -943,9 +945,11 @@ RETURN_UNGCPRO (value); } - if (! NILP (current_buffer->keymap)) + local = get_local_map (PT, current_buffer); + + if (! NILP (local)) { - value = Flookup_key (current_buffer->keymap, key, accept_default); + value = Flookup_key (local, key, accept_default); if (! NILP (value) && !INTEGERP (value)) RETURN_UNGCPRO (value); }