diff options
| author | Richard M. Stallman | 2005-01-13 19:49:53 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-01-13 19:49:53 +0000 |
| commit | d64cdc59724b7caca47913d5beb2b4a54f7b7c91 (patch) | |
| tree | b2ef9e1bf77792d5c49888e17c9d095f1fcd27a0 /src/keymap.c | |
| parent | ef8f2df66a7486e7a52c2df55f106f7a4c2959f6 (diff) | |
| download | emacs-d64cdc59724b7caca47913d5beb2b4a54f7b7c91.tar.gz emacs-d64cdc59724b7caca47913d5beb2b4a54f7b7c91.zip | |
(Fcurrent_active_maps): Ignore Voverriding_local_map
if Voverriding_terminal_local_map is non-nil.
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/keymap.c b/src/keymap.c index 99883415914..f5675d563ee 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1486,10 +1486,13 @@ OLP if non-nil indicates that we should obey `overriding-local-map' and | |||
| 1486 | 1486 | ||
| 1487 | if (!NILP (olp)) | 1487 | if (!NILP (olp)) |
| 1488 | { | 1488 | { |
| 1489 | if (!NILP (Voverriding_local_map)) | ||
| 1490 | keymaps = Fcons (Voverriding_local_map, keymaps); | ||
| 1491 | if (!NILP (current_kboard->Voverriding_terminal_local_map)) | 1489 | if (!NILP (current_kboard->Voverriding_terminal_local_map)) |
| 1492 | keymaps = Fcons (current_kboard->Voverriding_terminal_local_map, keymaps); | 1490 | keymaps = Fcons (current_kboard->Voverriding_terminal_local_map, keymaps); |
| 1491 | /* The doc said that overriding-terminal-local-map should | ||
| 1492 | override overriding-local-map. The code used them both, | ||
| 1493 | but it seems clearer to use just one. rms, jan 2005. */ | ||
| 1494 | else if (!NILP (Voverriding_local_map)) | ||
| 1495 | keymaps = Fcons (Voverriding_local_map, keymaps); | ||
| 1493 | } | 1496 | } |
| 1494 | if (NILP (XCDR (keymaps))) | 1497 | if (NILP (XCDR (keymaps))) |
| 1495 | { | 1498 | { |
| @@ -1497,16 +1500,20 @@ OLP if non-nil indicates that we should obey `overriding-local-map' and | |||
| 1497 | Lisp_Object *maps; | 1500 | Lisp_Object *maps; |
| 1498 | int nmaps, i; | 1501 | int nmaps, i; |
| 1499 | 1502 | ||
| 1503 | /* This usually returns the buffer's local map, | ||
| 1504 | but that can be overridden by a `local-map' property. */ | ||
| 1500 | local = get_local_map (PT, current_buffer, Qlocal_map); | 1505 | local = get_local_map (PT, current_buffer, Qlocal_map); |
| 1501 | if (!NILP (local)) | 1506 | if (!NILP (local)) |
| 1502 | keymaps = Fcons (local, keymaps); | 1507 | keymaps = Fcons (local, keymaps); |
| 1503 | 1508 | ||
| 1509 | /* Now put all the minor mode keymaps on the list. */ | ||
| 1504 | nmaps = current_minor_maps (0, &maps); | 1510 | nmaps = current_minor_maps (0, &maps); |
| 1505 | 1511 | ||
| 1506 | for (i = --nmaps; i >= 0; i--) | 1512 | for (i = --nmaps; i >= 0; i--) |
| 1507 | if (!NILP (maps[i])) | 1513 | if (!NILP (maps[i])) |
| 1508 | keymaps = Fcons (maps[i], keymaps); | 1514 | keymaps = Fcons (maps[i], keymaps); |
| 1509 | 1515 | ||
| 1516 | /* This returns nil unless there is a `keymap' property. */ | ||
| 1510 | local = get_local_map (PT, current_buffer, Qkeymap); | 1517 | local = get_local_map (PT, current_buffer, Qkeymap); |
| 1511 | if (!NILP (local)) | 1518 | if (!NILP (local)) |
| 1512 | keymaps = Fcons (local, keymaps); | 1519 | keymaps = Fcons (local, keymaps); |