From c53af71a2b367b93565aa75a21387e3752ac0650 Mon Sep 17 00:00:00 2001 From: John Foerch Date: Sat, 7 Nov 2009 20:09:28 -0500 Subject: [PATCH] read-key-binding-key: fix error when reading sequences the recent dynamic keymaps patch broke read-key-binding-key's support to read key sequences, because of a change in the possible return values of keymap_lookup. Also added docstring. --- modules/keymap.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/keymap.js b/modules/keymap.js index d301e4e..e1f500e 100644 --- a/modules/keymap.js +++ b/modules/keymap.js @@ -556,10 +556,10 @@ function read_key_binding_key (window, state, event) { return; } - if (binding.keymap) { + if (binding.constructor == Array) { //keymaps stack window.minibuffer._restore_normal_state(); window.minibuffer._input_text = state.key_sequence.join(" ") + " "; - state.target_keymap = binding.keymap; + state.target_keymap = binding; return; } @@ -571,9 +571,13 @@ function read_key_binding_key (window, state, event) { if (c != null) c([state.key_sequence, binding]); } -interactive("read-key-binding-key", null, function (I) { - read_key_binding_key(I.window, I.minibuffer.check_state(key_binding_reader), I.event); -}); +interactive("read-key-binding-key", + "Handle a keystroke in the key binding reader minibuffer state.", + function (I) { + read_key_binding_key(I.window, + I.minibuffer.check_state(key_binding_reader), + I.event); + }); minibuffer.prototype.read_key_binding = function () { keywords(arguments); -- 2.11.4.GIT