aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2014-06-18 23:48:18 -0400
committerStefan Monnier2014-06-18 23:48:18 -0400
commit1503d26aa07983b9c0c06b8d10a570a63eee7515 (patch)
tree69e1dcbafb69fd66abab4636f45a17ec30953d58 /src
parent52a6194ff6b327bcd520dc308f346d01e456b0b0 (diff)
downloademacs-1503d26aa07983b9c0c06b8d10a570a63eee7515.tar.gz
emacs-1503d26aa07983b9c0c06b8d10a570a63eee7515.zip
* src/keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
before checking key-translation-map. Fixes: debbugs:17659
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/keyboard.c26
2 files changed, 19 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6869116416a..58e3eab8339 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12014-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
4 before checking key-translation-map (bug#17659).
5
12014-06-19 Dmitry Antipov <dmantipov@yandex.ru> 62014-06-19 Dmitry Antipov <dmantipov@yandex.ru>
2 7
3 * font.c (font_make_object): Avoid dangling pointer which may 8 * font.c (font_make_object): Avoid dangling pointer which may
diff --git a/src/keyboard.c b/src/keyboard.c
index 8bc0c108739..eb27d6fefab 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2197,7 +2197,7 @@ show_help_echo (Lisp_Object help, Lisp_Object window, Lisp_Object object,
2197 2197
2198 2198
2199 2199
2200/* Input of single characters from keyboard */ 2200/* Input of single characters from keyboard. */
2201 2201
2202static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu, 2202static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu,
2203 struct timespec *end_time); 2203 struct timespec *end_time);
@@ -3656,7 +3656,8 @@ kbd_buffer_store_event_hold (register struct input_event *event,
3656 *kbd_store_ptr = *event; 3656 *kbd_store_ptr = *event;
3657 ++kbd_store_ptr; 3657 ++kbd_store_ptr;
3658#ifdef subprocesses 3658#ifdef subprocesses
3659 if (kbd_buffer_nr_stored () > KBD_BUFFER_SIZE/2 && ! kbd_on_hold_p ()) 3659 if (kbd_buffer_nr_stored () > KBD_BUFFER_SIZE / 2
3660 && ! kbd_on_hold_p ())
3660 { 3661 {
3661 /* Don't read keyboard input until we have processed kbd_buffer. 3662 /* Don't read keyboard input until we have processed kbd_buffer.
3662 This happens when pasting text longer than KBD_BUFFER_SIZE/2. */ 3663 This happens when pasting text longer than KBD_BUFFER_SIZE/2. */
@@ -9384,16 +9385,6 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9384 first_unbound = min (t, first_unbound); 9385 first_unbound = min (t, first_unbound);
9385 9386
9386 head = EVENT_HEAD (key); 9387 head = EVENT_HEAD (key);
9387 if (help_char_p (head) && t > 0)
9388 {
9389 read_key_sequence_cmd = Vprefix_help_command;
9390 keybuf[t++] = key;
9391 last_nonmenu_event = key;
9392 /* The Microsoft C compiler can't handle the goto that
9393 would go here. */
9394 dummyflag = 1;
9395 break;
9396 }
9397 9388
9398 if (SYMBOLP (head)) 9389 if (SYMBOLP (head))
9399 { 9390 {
@@ -9651,6 +9642,17 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9651 9642
9652 goto replay_sequence; 9643 goto replay_sequence;
9653 } 9644 }
9645
9646 if (NILP (current_binding)
9647 && help_char_p (EVENT_HEAD (key)) && t > 1)
9648 {
9649 read_key_sequence_cmd = Vprefix_help_command;
9650 /* The Microsoft C compiler can't handle the goto that
9651 would go here. */
9652 dummyflag = 1;
9653 break;
9654 }
9655
9654 /* If KEY is not defined in any of the keymaps, 9656 /* If KEY is not defined in any of the keymaps,
9655 and cannot be part of a function key or translation, 9657 and cannot be part of a function key or translation,
9656 and is a shifted function key, 9658 and is a shifted function key,