diff options
| author | Stefan Monnier | 2013-06-04 21:58:43 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-06-04 21:58:43 -0400 |
| commit | bfa3acd65ba6e8cbaf66a4f3f61810ffba7b3fad (patch) | |
| tree | 230455c7f248de71d969ec07de0760dfa77f91d7 /src/keymap.c | |
| parent | 2587b005f0f11913c2158fe8c81b18ebfc0beca8 (diff) | |
| download | emacs-bfa3acd65ba6e8cbaf66a4f3f61810ffba7b3fad.tar.gz emacs-bfa3acd65ba6e8cbaf66a4f3f61810ffba7b3fad.zip | |
* src/keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
* src/keyboard.c (menu_bar_items, tool_bar_items):
* src/doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
not override local keymaps any more.
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/src/keymap.c b/src/keymap.c index c43d528b25b..536db77f59b 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -56,28 +56,28 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 56 | #include "keymap.h" | 56 | #include "keymap.h" |
| 57 | #include "window.h" | 57 | #include "window.h" |
| 58 | 58 | ||
| 59 | /* Actually allocate storage for these variables */ | 59 | /* Actually allocate storage for these variables. */ |
| 60 | 60 | ||
| 61 | Lisp_Object current_global_map; /* Current global keymap */ | 61 | Lisp_Object current_global_map; /* Current global keymap. */ |
| 62 | 62 | ||
| 63 | Lisp_Object global_map; /* default global key bindings */ | 63 | Lisp_Object global_map; /* Default global key bindings. */ |
| 64 | 64 | ||
| 65 | Lisp_Object meta_map; /* The keymap used for globally bound | 65 | Lisp_Object meta_map; /* The keymap used for globally bound |
| 66 | ESC-prefixed default commands */ | 66 | ESC-prefixed default commands. */ |
| 67 | 67 | ||
| 68 | Lisp_Object control_x_map; /* The keymap used for globally bound | 68 | Lisp_Object control_x_map; /* The keymap used for globally bound |
| 69 | C-x-prefixed default commands */ | 69 | C-x-prefixed default commands. */ |
| 70 | 70 | ||
| 71 | /* The keymap used by the minibuf for local | 71 | /* The keymap used by the minibuf for local |
| 72 | bindings when spaces are allowed in the | 72 | bindings when spaces are allowed in the |
| 73 | minibuf */ | 73 | minibuf. */ |
| 74 | 74 | ||
| 75 | /* The keymap used by the minibuf for local | 75 | /* The keymap used by the minibuf for local |
| 76 | bindings when spaces are not encouraged | 76 | bindings when spaces are not encouraged |
| 77 | in the minibuf */ | 77 | in the minibuf. */ |
| 78 | 78 | ||
| 79 | /* keymap used for minibuffers when doing completion */ | 79 | /* Keymap used for minibuffers when doing completion. */ |
| 80 | /* keymap used for minibuffers when doing completion and require a match */ | 80 | /* Keymap used for minibuffers when doing completion and require a match. */ |
| 81 | static Lisp_Object Qkeymapp, Qnon_ascii; | 81 | static Lisp_Object Qkeymapp, Qnon_ascii; |
| 82 | Lisp_Object Qkeymap, Qmenu_item, Qremap; | 82 | Lisp_Object Qkeymap, Qmenu_item, Qremap; |
| 83 | static Lisp_Object QCadvertised_binding; | 83 | static Lisp_Object QCadvertised_binding; |
| @@ -1571,17 +1571,14 @@ like in the respective argument of `key-binding'. */) | |||
| 1571 | } | 1571 | } |
| 1572 | } | 1572 | } |
| 1573 | 1573 | ||
| 1574 | if (!NILP (olp)) | 1574 | if (!NILP (olp) |
| 1575 | { | ||
| 1576 | if (!NILP (KVAR (current_kboard, Voverriding_terminal_local_map))) | ||
| 1577 | keymaps = Fcons (KVAR (current_kboard, Voverriding_terminal_local_map), | ||
| 1578 | keymaps); | ||
| 1579 | /* The doc said that overriding-terminal-local-map should | 1575 | /* The doc said that overriding-terminal-local-map should |
| 1580 | override overriding-local-map. The code used them both, | 1576 | override overriding-local-map. The code used them both, |
| 1581 | but it seems clearer to use just one. rms, jan 2005. */ | 1577 | but it seems clearer to use just one. rms, jan 2005. */ |
| 1582 | else if (!NILP (Voverriding_local_map)) | 1578 | && NILP (KVAR (current_kboard, Voverriding_terminal_local_map)) |
| 1583 | keymaps = Fcons (Voverriding_local_map, keymaps); | 1579 | && !NILP (Voverriding_local_map)) |
| 1584 | } | 1580 | keymaps = Fcons (Voverriding_local_map, keymaps); |
| 1581 | |||
| 1585 | if (NILP (XCDR (keymaps))) | 1582 | if (NILP (XCDR (keymaps))) |
| 1586 | { | 1583 | { |
| 1587 | Lisp_Object *maps; | 1584 | Lisp_Object *maps; |
| @@ -1592,6 +1589,7 @@ like in the respective argument of `key-binding'. */) | |||
| 1592 | Lisp_Object local_map = get_local_map (pt, current_buffer, Qlocal_map); | 1589 | Lisp_Object local_map = get_local_map (pt, current_buffer, Qlocal_map); |
| 1593 | /* This returns nil unless there is a `keymap' property. */ | 1590 | /* This returns nil unless there is a `keymap' property. */ |
| 1594 | Lisp_Object keymap = get_local_map (pt, current_buffer, Qkeymap); | 1591 | Lisp_Object keymap = get_local_map (pt, current_buffer, Qkeymap); |
| 1592 | Lisp_Object otlp = KVAR (current_kboard, Voverriding_terminal_local_map); | ||
| 1595 | 1593 | ||
| 1596 | if (CONSP (position)) | 1594 | if (CONSP (position)) |
| 1597 | { | 1595 | { |
| @@ -1656,6 +1654,9 @@ like in the respective argument of `key-binding'. */) | |||
| 1656 | 1654 | ||
| 1657 | if (!NILP (keymap)) | 1655 | if (!NILP (keymap)) |
| 1658 | keymaps = Fcons (keymap, keymaps); | 1656 | keymaps = Fcons (keymap, keymaps); |
| 1657 | |||
| 1658 | if (!NILP (olp) && !NILP (otlp)) | ||
| 1659 | keymaps = Fcons (otlp, keymaps); | ||
| 1659 | } | 1660 | } |
| 1660 | 1661 | ||
| 1661 | unbind_to (count, Qnil); | 1662 | unbind_to (count, Qnil); |
| @@ -2851,7 +2852,7 @@ You type Translation\n\ | |||
| 2851 | 2852 | ||
| 2852 | insert ("\n", 1); | 2853 | insert ("\n", 1); |
| 2853 | 2854 | ||
| 2854 | /* Insert calls signal_after_change which may GC. */ | 2855 | /* Insert calls signal_after_change which may GC. */ |
| 2855 | translate = SDATA (KVAR (current_kboard, Vkeyboard_translate_table)); | 2856 | translate = SDATA (KVAR (current_kboard, Vkeyboard_translate_table)); |
| 2856 | } | 2857 | } |
| 2857 | 2858 | ||
| @@ -2867,6 +2868,14 @@ You type Translation\n\ | |||
| 2867 | start1 = Qnil; | 2868 | start1 = Qnil; |
| 2868 | if (!NILP (KVAR (current_kboard, Voverriding_terminal_local_map))) | 2869 | if (!NILP (KVAR (current_kboard, Voverriding_terminal_local_map))) |
| 2869 | start1 = KVAR (current_kboard, Voverriding_terminal_local_map); | 2870 | start1 = KVAR (current_kboard, Voverriding_terminal_local_map); |
| 2871 | |||
| 2872 | if (!NILP (start1)) | ||
| 2873 | { | ||
| 2874 | describe_map_tree (start1, 1, shadow, prefix, | ||
| 2875 | "\f\nOverriding Bindings", nomenu, 0, 0, 0); | ||
| 2876 | shadow = Fcons (start1, shadow); | ||
| 2877 | start1 = Qnil; | ||
| 2878 | } | ||
| 2870 | else if (!NILP (Voverriding_local_map)) | 2879 | else if (!NILP (Voverriding_local_map)) |
| 2871 | start1 = Voverriding_local_map; | 2880 | start1 = Voverriding_local_map; |
| 2872 | 2881 | ||