aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2002-02-23 22:03:17 +0000
committerKim F. Storm2002-02-23 22:03:17 +0000
commita34cb674af3340c929bc1120c0ea8369846b86d9 (patch)
tree18237b201e742d74f538cd37a6a3cfed8a0909be /src
parent81607000032c1d89514d76e248cec3089cc14938 (diff)
downloademacs-a34cb674af3340c929bc1120c0ea8369846b86d9.tar.gz
emacs-a34cb674af3340c929bc1120c0ea8369846b86d9.zip
(command_loop_1): Use Fremap_command for command remapping;
now try command remapping for all symbols.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog26
-rw-r--r--src/keyboard.c6
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 @@
12002-02-23 Kim F. Storm <no-spam@cua.dk>
2
3 The following changes rework my patch of 2002-02-06 which
4 added command remapping by entering the commands directly into
5 the keymaps. Now, command remapping uses an explicit `remap'
6 prefix in the keymaps, i.e. [remap COMMAND].
7
8 * keymap.c (Qremap, remap_command_vector): New variables.
9 (is_command_symbol): Removed function.
10 (Fdefine_key): No longer accept a symbol for KEY. Added
11 validation of [remap COMMAND] argument for KEY. The DEF is no
12 longer required to be a symbol when remapping a command.
13 (Fremap_command): New function to remap command through keymaps.
14 (Flookup_key): Perform command remapping initiated by
15 Fremap_command directly for speed.
16 (Fkey_binding): Use Fremap_command for command remapping.
17 (where_is_internal): Handle new command remapping representation.
18 (syms_of_keymap): Intern Qremap, initialize remap_command_vector,
19 staticpro them. Defsubr Fremap_command.
20
21 * keymap.h (Fremap_command): Declare extern.
22 (is_command_symbol): Remove extern.
23
24 * keyboard.c (command_loop_1): Use Fremap_command for command
25 remapping; now try command remapping for all symbols.
26
12002-02-23 Eli Zaretskii <eliz@is.elta.co.il> 272002-02-23 Eli Zaretskii <eliz@is.elta.co.il>
2 28
3 * coding.h (run_pre_post_conversion_on_str): Add prototype. 29 * 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 ()
1506 1506
1507 /* Remap command through active keymaps */ 1507 /* Remap command through active keymaps */
1508 Vthis_original_command = cmd; 1508 Vthis_original_command = cmd;
1509 if (is_command_symbol (cmd)) 1509 if (SYMBOLP (cmd))
1510 { 1510 {
1511 Lisp_Object cmd1; 1511 Lisp_Object cmd1;
1512 1512 if (cmd1 = Fremap_command (cmd), !NILP (cmd1))
1513 cmd1 = Fkey_binding (cmd, Qnil, Qt);
1514 if (!NILP (cmd1) && is_command_symbol (cmd1))
1515 cmd = cmd1; 1513 cmd = cmd1;
1516 } 1514 }
1517 1515