diff options
| author | Dave Love | 2000-05-29 11:54:51 +0000 |
|---|---|---|
| committer | Dave Love | 2000-05-29 11:54:51 +0000 |
| commit | 93d2aa1c9b5d493b60f71bab1ee39473f75e96fc (patch) | |
| tree | 8e53130fd013b0a8768da33b01d75613291d97d1 /src/keymap.c | |
| parent | 8c45fa0a881b9e42cb36a38d7ce880752a7917d9 (diff) | |
| download | emacs-93d2aa1c9b5d493b60f71bab1ee39473f75e96fc.tar.gz emacs-93d2aa1c9b5d493b60f71bab1ee39473f75e96fc.zip | |
Include intervals.h.
(Fkey_binding, Fwhere_is_internal): Deal with `keymap' property.
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 26 |
1 files 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. */ | |||
| 30 | #include "termhooks.h" | 30 | #include "termhooks.h" |
| 31 | #include "blockinput.h" | 31 | #include "blockinput.h" |
| 32 | #include "puresize.h" | 32 | #include "puresize.h" |
| 33 | #include "intervals.h" | ||
| 33 | 34 | ||
| 34 | #define min(a, b) ((a) < (b) ? (a) : (b)) | 35 | #define min(a, b) ((a) < (b) ? (a) : (b)) |
| 35 | 36 | ||
| @@ -1285,7 +1286,15 @@ recognize the default bindings, just as `read-key-sequence' does.") | |||
| 1285 | RETURN_UNGCPRO (value); | 1286 | RETURN_UNGCPRO (value); |
| 1286 | } | 1287 | } |
| 1287 | 1288 | ||
| 1288 | local = get_local_map (PT, current_buffer); | 1289 | local = get_local_map (PT, current_buffer, keymap); |
| 1290 | if (! NILP (local)) | ||
| 1291 | { | ||
| 1292 | value = Flookup_key (local, key, accept_default); | ||
| 1293 | if (! NILP (value) && !INTEGERP (value)) | ||
| 1294 | RETURN_UNGCPRO (value); | ||
| 1295 | } | ||
| 1296 | |||
| 1297 | local = get_local_map (PT, current_buffer, local_map); | ||
| 1289 | 1298 | ||
| 1290 | if (! NILP (local)) | 1299 | if (! NILP (local)) |
| 1291 | { | 1300 | { |
| @@ -2068,14 +2077,25 @@ indirect definition itself.") | |||
| 2068 | shadowed bindings. */ | 2077 | shadowed bindings. */ |
| 2069 | keymap1 = keymap; | 2078 | keymap1 = keymap; |
| 2070 | if (! keymap_specified) | 2079 | if (! keymap_specified) |
| 2071 | keymap1 = get_local_map (PT, current_buffer); | 2080 | keymap1 = get_local_map (PT, current_buffer, keymap); |
| 2072 | 2081 | ||
| 2073 | if (!NILP (keymap1)) | 2082 | if (!NILP (keymap1)) |
| 2074 | maps = nconc2 (Faccessible_keymaps (get_keymap (keymap1), Qnil), | 2083 | maps = nconc2 (Faccessible_keymaps (get_keymap (keymap1), Qnil), |
| 2075 | Faccessible_keymaps (get_keymap (current_global_map), | 2084 | Faccessible_keymaps (get_keymap (current_global_map), |
| 2076 | Qnil)); | 2085 | Qnil)); |
| 2077 | else | 2086 | else |
| 2078 | maps = Faccessible_keymaps (get_keymap (current_global_map), Qnil); | 2087 | { |
| 2088 | keymap1 = keymap; | ||
| 2089 | if (! keymap_specified) | ||
| 2090 | keymap1 = get_local_map (PT, current_buffer, local_map); | ||
| 2091 | |||
| 2092 | if (!NILP (keymap1)) | ||
| 2093 | maps = nconc2 (Faccessible_keymaps (get_keymap (keymap1), Qnil), | ||
| 2094 | Faccessible_keymaps (get_keymap (current_global_map), | ||
| 2095 | Qnil)); | ||
| 2096 | else | ||
| 2097 | maps = Faccessible_keymaps (get_keymap (current_global_map), Qnil); | ||
| 2098 | } | ||
| 2079 | 2099 | ||
| 2080 | /* Put the minor mode keymaps on the front. */ | 2100 | /* Put the minor mode keymaps on the front. */ |
| 2081 | if (! keymap_specified) | 2101 | if (! keymap_specified) |