From 93d2aa1c9b5d493b60f71bab1ee39473f75e96fc Mon Sep 17 00:00:00 2001 From: Dave Love Date: Mon, 29 May 2000 11:54:51 +0000 Subject: [PATCH] Include intervals.h. (Fkey_binding, Fwhere_is_internal): Deal with `keymap' property. --- src/keymap.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/keymap.c b/src/keymap.c index 2a6114907f9..c7e0f394b57 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA. */ #include "termhooks.h" #include "blockinput.h" #include "puresize.h" +#include "intervals.h" #define min(a, b) ((a) < (b) ? (a) : (b)) @@ -1285,7 +1286,15 @@ recognize the default bindings, just as `read-key-sequence' does.") RETURN_UNGCPRO (value); } - local = get_local_map (PT, current_buffer); + local = get_local_map (PT, current_buffer, keymap); + if (! NILP (local)) + { + value = Flookup_key (local, key, accept_default); + if (! NILP (value) && !INTEGERP (value)) + RETURN_UNGCPRO (value); + } + + local = get_local_map (PT, current_buffer, local_map); if (! NILP (local)) { @@ -2068,14 +2077,25 @@ indirect definition itself.") shadowed bindings. */ keymap1 = keymap; if (! keymap_specified) - keymap1 = get_local_map (PT, current_buffer); + keymap1 = get_local_map (PT, current_buffer, keymap); if (!NILP (keymap1)) maps = nconc2 (Faccessible_keymaps (get_keymap (keymap1), Qnil), Faccessible_keymaps (get_keymap (current_global_map), Qnil)); else - maps = Faccessible_keymaps (get_keymap (current_global_map), Qnil); + { + keymap1 = keymap; + if (! keymap_specified) + keymap1 = get_local_map (PT, current_buffer, local_map); + + if (!NILP (keymap1)) + maps = nconc2 (Faccessible_keymaps (get_keymap (keymap1), Qnil), + Faccessible_keymaps (get_keymap (current_global_map), + Qnil)); + else + maps = Faccessible_keymaps (get_keymap (current_global_map), Qnil); + } /* Put the minor mode keymaps on the front. */ if (! keymap_specified) -- 2.39.5