summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-06-18 23:48:18 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-06-18 23:48:18 -0400
commit1503d26aa07983b9c0c06b8d10a570a63eee7515 (patch)
tree69e1dcbafb69fd66abab4636f45a17ec30953d58
parent52a6194ff6b327bcd520dc308f346d01e456b0b0 (diff)
downloademacs-1503d26aa07983b9c0c06b8d10a570a63eee7515.tar.gz
* src/keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
before checking key-translation-map. Fixes: debbugs:17659
-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 @@
+2014-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
+ before checking key-translation-map (bug#17659).
+
2014-06-19 Dmitry Antipov <dmantipov@yandex.ru>
* 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,
-/* Input of single characters from keyboard */
+/* Input of single characters from keyboard. */
static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, bool *used_mouse_menu,
struct timespec *end_time);
@@ -3656,7 +3656,8 @@ kbd_buffer_store_event_hold (register struct input_event *event,
*kbd_store_ptr = *event;
++kbd_store_ptr;
#ifdef subprocesses
- if (kbd_buffer_nr_stored () > KBD_BUFFER_SIZE/2 && ! kbd_on_hold_p ())
+ if (kbd_buffer_nr_stored () > KBD_BUFFER_SIZE / 2
+ && ! kbd_on_hold_p ())
{
/* Don't read keyboard input until we have processed kbd_buffer.
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,
first_unbound = min (t, first_unbound);
head = EVENT_HEAD (key);
- if (help_char_p (head) && t > 0)
- {
- read_key_sequence_cmd = Vprefix_help_command;
- keybuf[t++] = key;
- last_nonmenu_event = key;
- /* The Microsoft C compiler can't handle the goto that
- would go here. */
- dummyflag = 1;
- break;
- }
if (SYMBOLP (head))
{
@@ -9651,6 +9642,17 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
goto replay_sequence;
}
+
+ if (NILP (current_binding)
+ && help_char_p (EVENT_HEAD (key)) && t > 1)
+ {
+ read_key_sequence_cmd = Vprefix_help_command;
+ /* The Microsoft C compiler can't handle the goto that
+ would go here. */
+ dummyflag = 1;
+ break;
+ }
+
/* If KEY is not defined in any of the keymaps,
and cannot be part of a function key or translation,
and is a shifted function key,