From a34cb674af3340c929bc1120c0ea8369846b86d9 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 23 Feb 2002 22:03:17 +0000 Subject: [PATCH] (command_loop_1): Use Fremap_command for command remapping; now try command remapping for all symbols. --- src/ChangeLog | 26 ++++++++++++++++++++++++++ src/keyboard.c | 6 ++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 209761574f8..efb3a8d2aad 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,29 @@ +2002-02-23 Kim F. Storm + + The following changes rework my patch of 2002-02-06 which + added command remapping by entering the commands directly into + the keymaps. Now, command remapping uses an explicit `remap' + prefix in the keymaps, i.e. [remap COMMAND]. + + * keymap.c (Qremap, remap_command_vector): New variables. + (is_command_symbol): Removed function. + (Fdefine_key): No longer accept a symbol for KEY. Added + validation of [remap COMMAND] argument for KEY. The DEF is no + longer required to be a symbol when remapping a command. + (Fremap_command): New function to remap command through keymaps. + (Flookup_key): Perform command remapping initiated by + Fremap_command directly for speed. + (Fkey_binding): Use Fremap_command for command remapping. + (where_is_internal): Handle new command remapping representation. + (syms_of_keymap): Intern Qremap, initialize remap_command_vector, + staticpro them. Defsubr Fremap_command. + + * keymap.h (Fremap_command): Declare extern. + (is_command_symbol): Remove extern. + + * keyboard.c (command_loop_1): Use Fremap_command for command + remapping; now try command remapping for all symbols. + 2002-02-23 Eli Zaretskii * coding.h (run_pre_post_conversion_on_str): Add prototype. diff --git a/src/keyboard.c b/src/keyboard.c index dcb11d75c28..61f27adb3d5 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1506,12 +1506,10 @@ command_loop_1 () /* Remap command through active keymaps */ Vthis_original_command = cmd; - if (is_command_symbol (cmd)) + if (SYMBOLP (cmd)) { Lisp_Object cmd1; - - cmd1 = Fkey_binding (cmd, Qnil, Qt); - if (!NILP (cmd1) && is_command_symbol (cmd1)) + if (cmd1 = Fremap_command (cmd), !NILP (cmd1)) cmd = cmd1; } -- 2.39.5