diff options
| author | Richard M. Stallman | 2006-08-09 04:55:10 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-08-09 04:55:10 +0000 |
| commit | c2028ac64fab925570fa9ef7e1ed564f4aa3eb2c (patch) | |
| tree | ea4941875da801a20101a2f88e3dc2bb34dcb66a /src | |
| parent | bb0825cb7d70a290d61946d53f2a665ce8a4a14c (diff) | |
| download | emacs-c2028ac64fab925570fa9ef7e1ed564f4aa3eb2c.tar.gz emacs-c2028ac64fab925570fa9ef7e1ed564f4aa3eb2c.zip | |
(keyremap_step): No-op if fkey->parent = nil.
(read_key_sequence): Always start fkey.start and fkey.end at 0,
and likewise for keytran.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/keyboard.c | 25 |
2 files changed, 24 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9d23a23e6a5..678078d3781 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-08-09 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * keyboard.c (keyremap_step): No-op if fkey->parent = nil. | ||
| 4 | (read_key_sequence): Always start fkey.start and fkey.end at 0, | ||
| 5 | and likewise for keytran. | ||
| 6 | |||
| 1 | 2006-08-09 Kenichi Handa <handa@m17n.org> | 7 | 2006-08-09 Kenichi Handa <handa@m17n.org> |
| 2 | 8 | ||
| 3 | * coding.c (syms_of_coding): Improve the docstring | 9 | * coding.c (syms_of_coding): Improve the docstring |
diff --git a/src/keyboard.c b/src/keyboard.c index 6f12994a1b8..ae3b78b04d2 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -8385,7 +8385,15 @@ follow_key (key, nmaps, current, defs, next) | |||
| 8385 | such as Vfunction_key_map and Vkey_translation_map. */ | 8385 | such as Vfunction_key_map and Vkey_translation_map. */ |
| 8386 | typedef struct keyremap | 8386 | typedef struct keyremap |
| 8387 | { | 8387 | { |
| 8388 | Lisp_Object map, parent; | 8388 | /* This is the map originally specified for this use. */ |
| 8389 | Lisp_Object parent; | ||
| 8390 | /* This is a submap reached by looking up, in PARENT, | ||
| 8391 | the events from START to END. */ | ||
| 8392 | Lisp_Object map; | ||
| 8393 | /* Positions [START, END) in the key sequence buffer | ||
| 8394 | are the key that we have scanned so far. | ||
| 8395 | Those events are the ones that we will replace | ||
| 8396 | if PAREHT maps them into a key sequence. */ | ||
| 8389 | int start, end; | 8397 | int start, end; |
| 8390 | } keyremap; | 8398 | } keyremap; |
| 8391 | 8399 | ||
| @@ -8458,7 +8466,11 @@ keyremap_step (keybuf, bufsize, fkey, input, doit, diff, prompt) | |||
| 8458 | Lisp_Object next, key; | 8466 | Lisp_Object next, key; |
| 8459 | 8467 | ||
| 8460 | key = keybuf[fkey->end++]; | 8468 | key = keybuf[fkey->end++]; |
| 8461 | next = access_keymap_keyremap (fkey->map, key, prompt, doit); | 8469 | |
| 8470 | if (KEYMAPP (fkey->parent)) | ||
| 8471 | next = access_keymap_keyremap (fkey->map, key, prompt, doit); | ||
| 8472 | else | ||
| 8473 | next = Qnil; | ||
| 8462 | 8474 | ||
| 8463 | /* If keybuf[fkey->start..fkey->end] is bound in the | 8475 | /* If keybuf[fkey->start..fkey->end] is bound in the |
| 8464 | map and we're in a position to do the key remapping, replace it with | 8476 | map and we're in a position to do the key remapping, replace it with |
| @@ -8656,9 +8668,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 8656 | delayed_switch_frame = Qnil; | 8668 | delayed_switch_frame = Qnil; |
| 8657 | fkey.map = fkey.parent = Vfunction_key_map; | 8669 | fkey.map = fkey.parent = Vfunction_key_map; |
| 8658 | keytran.map = keytran.parent = Vkey_translation_map; | 8670 | keytran.map = keytran.parent = Vkey_translation_map; |
| 8659 | /* If there is no translation-map, turn off scanning. */ | 8671 | fkey.start = fkey.end = 0; |
| 8660 | fkey.start = fkey.end = KEYMAPP (fkey.map) ? 0 : bufsize + 1; | 8672 | keytran.start = keytran.end = 0; |
| 8661 | keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1; | ||
| 8662 | 8673 | ||
| 8663 | if (INTERACTIVE) | 8674 | if (INTERACTIVE) |
| 8664 | { | 8675 | { |
| @@ -9486,8 +9497,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9486 | 9497 | ||
| 9487 | keybuf[t - 1] = new_key; | 9498 | keybuf[t - 1] = new_key; |
| 9488 | mock_input = max (t, mock_input); | 9499 | mock_input = max (t, mock_input); |
| 9489 | fkey.start = fkey.end = KEYMAPP (fkey.map) ? 0 : bufsize + 1; | 9500 | fkey.start = fkey.end = 0; |
| 9490 | keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1; | 9501 | keytran.start = keytran.end = 0; |
| 9491 | 9502 | ||
| 9492 | goto replay_sequence; | 9503 | goto replay_sequence; |
| 9493 | } | 9504 | } |