diff options
| author | Karl Heuer <kwzh@gnu.org> | 1995-12-21 17:10:27 +0000 |
|---|---|---|
| committer | Karl Heuer <kwzh@gnu.org> | 1995-12-21 17:10:27 +0000 |
| commit | d964248c519c4da03205b23bd301027c0f35d951 (patch) | |
| tree | dbeff78a7dfbea0da79798f32971443eebf41d09 /src | |
| parent | 22a513448fdbea14ccfa2cf081b2947a5fd15e0b (diff) | |
| download | emacs-d964248c519c4da03205b23bd301027c0f35d951.tar.gz | |
(Fkey_binding): Handle text-property keymaps.
Include puresize.h.
(store_in_keymap): Check PURE_P (def) and copy if nec.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keymap.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/keymap.c b/src/keymap.c index 29b8c49af1d..19606fccbf9 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -27,6 +27,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "keyboard.h" #include "termhooks.h" #include "blockinput.h" +#include "puresize.h" #define min(a, b) ((a) < (b) ? (a) : (b)) @@ -405,8 +406,7 @@ store_in_keymap (keymap, idx, def) { /* 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 @@ recognize the default bindings, just as `read-key-sequence' does.") } 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 @@ recognize the default bindings, just as `read-key-sequence' does.") 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); } |
