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/keyboard.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/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 8dd109d252d..d01ecb9432b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -7392,7 +7392,8 @@ menu_bar_items (Lisp_Object old) | |||
| 7392 | Lisp_Object *tmaps; | 7392 | Lisp_Object *tmaps; |
| 7393 | 7393 | ||
| 7394 | /* Should overriding-terminal-local-map and overriding-local-map apply? */ | 7394 | /* Should overriding-terminal-local-map and overriding-local-map apply? */ |
| 7395 | if (!NILP (Voverriding_local_map_menu_flag)) | 7395 | if (!NILP (Voverriding_local_map_menu_flag) |
| 7396 | && !NILP (Voverriding_local_map)) | ||
| 7396 | { | 7397 | { |
| 7397 | /* Yes, use them (if non-nil) as well as the global map. */ | 7398 | /* Yes, use them (if non-nil) as well as the global map. */ |
| 7398 | maps = alloca (3 * sizeof (maps[0])); | 7399 | maps = alloca (3 * sizeof (maps[0])); |
| @@ -7412,8 +7413,11 @@ menu_bar_items (Lisp_Object old) | |||
| 7412 | Lisp_Object tem; | 7413 | Lisp_Object tem; |
| 7413 | ptrdiff_t nminor; | 7414 | ptrdiff_t nminor; |
| 7414 | nminor = current_minor_maps (NULL, &tmaps); | 7415 | nminor = current_minor_maps (NULL, &tmaps); |
| 7415 | maps = alloca ((nminor + 3) * sizeof *maps); | 7416 | maps = alloca ((nminor + 4) * sizeof *maps); |
| 7416 | nmaps = 0; | 7417 | nmaps = 0; |
| 7418 | tem = KVAR (current_kboard, Voverriding_terminal_local_map); | ||
| 7419 | if (!NILP (tem) && !NILP (Voverriding_local_map_menu_flag)) | ||
| 7420 | maps[nmaps++] = tem; | ||
| 7417 | if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem)) | 7421 | if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem)) |
| 7418 | maps[nmaps++] = tem; | 7422 | maps[nmaps++] = tem; |
| 7419 | memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0])); | 7423 | memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0])); |
| @@ -7938,7 +7942,8 @@ tool_bar_items (Lisp_Object reuse, int *nitems) | |||
| 7938 | to process. */ | 7942 | to process. */ |
| 7939 | 7943 | ||
| 7940 | /* Should overriding-terminal-local-map and overriding-local-map apply? */ | 7944 | /* Should overriding-terminal-local-map and overriding-local-map apply? */ |
| 7941 | if (!NILP (Voverriding_local_map_menu_flag)) | 7945 | if (!NILP (Voverriding_local_map_menu_flag) |
| 7946 | && !NILP (Voverriding_local_map)) | ||
| 7942 | { | 7947 | { |
| 7943 | /* Yes, use them (if non-nil) as well as the global map. */ | 7948 | /* Yes, use them (if non-nil) as well as the global map. */ |
| 7944 | maps = alloca (3 * sizeof *maps); | 7949 | maps = alloca (3 * sizeof *maps); |
| @@ -7958,8 +7963,11 @@ tool_bar_items (Lisp_Object reuse, int *nitems) | |||
| 7958 | Lisp_Object tem; | 7963 | Lisp_Object tem; |
| 7959 | ptrdiff_t nminor; | 7964 | ptrdiff_t nminor; |
| 7960 | nminor = current_minor_maps (NULL, &tmaps); | 7965 | nminor = current_minor_maps (NULL, &tmaps); |
| 7961 | maps = alloca ((nminor + 3) * sizeof *maps); | 7966 | maps = alloca ((nminor + 4) * sizeof *maps); |
| 7962 | nmaps = 0; | 7967 | nmaps = 0; |
| 7968 | tem = KVAR (current_kboard, Voverriding_terminal_local_map); | ||
| 7969 | if (!NILP (tem) && !NILP (Voverriding_local_map_menu_flag)) | ||
| 7970 | maps[nmaps++] = tem; | ||
| 7963 | if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem)) | 7971 | if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem)) |
| 7964 | maps[nmaps++] = tem; | 7972 | maps[nmaps++] = tem; |
| 7965 | memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0])); | 7973 | memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0])); |
| @@ -11443,10 +11451,7 @@ tool-bar separators natively. Otherwise it is unused (e.g. on GTK). */); | |||
| 11443 | 11451 | ||
| 11444 | DEFVAR_KBOARD ("overriding-terminal-local-map", | 11452 | DEFVAR_KBOARD ("overriding-terminal-local-map", |
| 11445 | Voverriding_terminal_local_map, | 11453 | Voverriding_terminal_local_map, |
| 11446 | doc: /* Per-terminal keymap that overrides all other local keymaps. | 11454 | doc: /* Per-terminal keymap that takes precedence over all other keymaps. |
| 11447 | If this variable is non-nil, it is used as a keymap instead of the | ||
| 11448 | buffer's local map, and the minor mode keymaps and text property keymaps. | ||
| 11449 | It also replaces `overriding-local-map'. | ||
| 11450 | 11455 | ||
| 11451 | This variable is intended to let commands such as `universal-argument' | 11456 | This variable is intended to let commands such as `universal-argument' |
| 11452 | set up a different keymap for reading the next command. | 11457 | set up a different keymap for reading the next command. |
| @@ -11456,7 +11461,7 @@ terminal device. | |||
| 11456 | See Info node `(elisp)Multiple Terminals'. */); | 11461 | See Info node `(elisp)Multiple Terminals'. */); |
| 11457 | 11462 | ||
| 11458 | DEFVAR_LISP ("overriding-local-map", Voverriding_local_map, | 11463 | DEFVAR_LISP ("overriding-local-map", Voverriding_local_map, |
| 11459 | doc: /* Keymap that overrides all other local keymaps. | 11464 | doc: /* Keymap that overrides almost all other local keymaps. |
| 11460 | If this variable is non-nil, it is used as a keymap--replacing the | 11465 | If this variable is non-nil, it is used as a keymap--replacing the |
| 11461 | buffer's local map, the minor mode keymaps, and char property keymaps. */); | 11466 | buffer's local map, the minor mode keymaps, and char property keymaps. */); |
| 11462 | Voverriding_local_map = Qnil; | 11467 | Voverriding_local_map = Qnil; |