aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2002-01-03 21:28:16 +0000
committerRichard M. Stallman2002-01-03 21:28:16 +0000
commitd1d070e3c5595ae6aab66287651f60ea102039d0 (patch)
tree0f35c289b9b793c1001cde6c6d44079a97db4ace /src
parent3dc5f18e682f62402b9aaa3358e134ab4a78b432 (diff)
downloademacs-d1d070e3c5595ae6aab66287651f60ea102039d0.tar.gz
emacs-d1d070e3c5595ae6aab66287651f60ea102039d0.zip
(Fcurrent_active_maps): Put the `keymap' property map first.
(Fkey_binding): Try the `keymap' property map first. (Fdescribe_buffer_bindings): Show `keymap' property bindings before minor mode bindings.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/keymap.c46
2 files changed, 30 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 05fab464fb8..4bad3889f74 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12002-01-03 Richard M. Stallman <rms@gnu.org>
2
3 * keymap.c (Fcurrent_active_maps): Put the `keymap' property map first.
4 (Fkey_binding): Try the `keymap' property map first.
5 (Fdescribe_buffer_bindings): Show `keymap' property bindings before
6 minor mode bindings.
7
12002-01-03 Kim F. Storm <storm@cua.dk> 82002-01-03 Kim F. Storm <storm@cua.dk>
2 9
3 * keyboard.c (read_key_sequence): Fixed cast of submaps arg to bcopy. 10 * keyboard.c (read_key_sequence): Fixed cast of submaps arg to bcopy.
diff --git a/src/keymap.c b/src/keymap.c
index a6867db32c0..362f022b100 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1347,15 +1347,15 @@ OLP if non-nil indicates that we should obey `overriding-local-map' and
1347 if (!NILP (local)) 1347 if (!NILP (local))
1348 keymaps = Fcons (local, keymaps); 1348 keymaps = Fcons (local, keymaps);
1349 1349
1350 local = get_local_map (PT, current_buffer, Qkeymap);
1351 if (!NILP (local))
1352 keymaps = Fcons (local, keymaps);
1353
1354 nmaps = current_minor_maps (0, &maps); 1350 nmaps = current_minor_maps (0, &maps);
1355 1351
1356 for (i = --nmaps; i >= 0; i--) 1352 for (i = --nmaps; i >= 0; i--)
1357 if (!NILP (maps[i])) 1353 if (!NILP (maps[i]))
1358 keymaps = Fcons (maps[i], keymaps); 1354 keymaps = Fcons (maps[i], keymaps);
1355
1356 local = get_local_map (PT, current_buffer, Qkeymap);
1357 if (!NILP (local))
1358 keymaps = Fcons (local, keymaps);
1359 } 1359 }
1360 1360
1361 return keymaps; 1361 return keymaps;
@@ -1399,6 +1399,14 @@ recognize the default bindings, just as `read-key-sequence' does. */)
1399 { 1399 {
1400 Lisp_Object local; 1400 Lisp_Object local;
1401 1401
1402 local = get_local_map (PT, current_buffer, Qkeymap);
1403 if (! NILP (local))
1404 {
1405 value = Flookup_key (local, key, accept_default);
1406 if (! NILP (value) && !INTEGERP (value))
1407 RETURN_UNGCPRO (value);
1408 }
1409
1402 nmaps = current_minor_maps (0, &maps); 1410 nmaps = current_minor_maps (0, &maps);
1403 /* Note that all these maps are GCPRO'd 1411 /* Note that all these maps are GCPRO'd
1404 in the places where we found them. */ 1412 in the places where we found them. */
@@ -1411,16 +1419,7 @@ recognize the default bindings, just as `read-key-sequence' does. */)
1411 RETURN_UNGCPRO (value); 1419 RETURN_UNGCPRO (value);
1412 } 1420 }
1413 1421
1414 local = get_local_map (PT, current_buffer, Qkeymap);
1415 if (! NILP (local))
1416 {
1417 value = Flookup_key (local, key, accept_default);
1418 if (! NILP (value) && !INTEGERP (value))
1419 RETURN_UNGCPRO (value);
1420 }
1421
1422 local = get_local_map (PT, current_buffer, Qlocal_map); 1422 local = get_local_map (PT, current_buffer, Qlocal_map);
1423
1424 if (! NILP (local)) 1423 if (! NILP (local))
1425 { 1424 {
1426 value = Flookup_key (local, key, accept_default); 1425 value = Flookup_key (local, key, accept_default);
@@ -2613,6 +2612,15 @@ You type Translation\n\
2613 nmaps = current_minor_maps (&modes, &maps); 2612 nmaps = current_minor_maps (&modes, &maps);
2614 Fset_buffer (outbuf); 2613 Fset_buffer (outbuf);
2615 2614
2615 start1 = get_local_map (BUF_PT (XBUFFER (buffer)),
2616 XBUFFER (buffer), Qkeymap);
2617 if (!NILP (start1))
2618 {
2619 describe_map_tree (start1, 1, shadow, prefix,
2620 "\f\n`keymap' Property Bindings", nomenu, 0, 0);
2621 shadow = Fcons (start1, shadow);
2622 }
2623
2616 /* Print the minor mode maps. */ 2624 /* Print the minor mode maps. */
2617 for (i = 0; i < nmaps; i++) 2625 for (i = 0; i < nmaps; i++)
2618 { 2626 {
@@ -2642,15 +2650,6 @@ You type Translation\n\
2642 } 2650 }
2643 2651
2644 start1 = get_local_map (BUF_PT (XBUFFER (buffer)), 2652 start1 = get_local_map (BUF_PT (XBUFFER (buffer)),
2645 XBUFFER (buffer), Qkeymap);
2646 if (!NILP (start1))
2647 {
2648 describe_map_tree (start1, 1, shadow, prefix,
2649 "\f\nChar Property Bindings", nomenu, 0, 0);
2650 shadow = Fcons (start1, shadow);
2651 }
2652
2653 start1 = get_local_map (BUF_PT (XBUFFER (buffer)),
2654 XBUFFER (buffer), Qlocal_map); 2653 XBUFFER (buffer), Qlocal_map);
2655 if (!NILP (start1)) 2654 if (!NILP (start1))
2656 { 2655 {
@@ -2659,7 +2658,8 @@ You type Translation\n\
2659 "\f\nMajor Mode Bindings", nomenu, 0, 0); 2658 "\f\nMajor Mode Bindings", nomenu, 0, 0);
2660 else 2659 else
2661 describe_map_tree (start1, 1, shadow, prefix, 2660 describe_map_tree (start1, 1, shadow, prefix,
2662 "\f\nChar Property Bindings", nomenu, 0, 0); 2661 "\f\n`local-map' Property Bindings",
2662 nomenu, 0, 0);
2663 2663
2664 shadow = Fcons (start1, shadow); 2664 shadow = Fcons (start1, shadow);
2665 } 2665 }