aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-06-17 23:46:27 +0000
committerRichard M. Stallman1995-06-17 23:46:27 +0000
commit107fd03d986957f38257b5e943852a255bdd9ba2 (patch)
tree334e9f35d6202efca81c1c408ad5884cf4482397 /src
parentcd2db344de7834b5de08a38bfbc871dc834b7b69 (diff)
downloademacs-107fd03d986957f38257b5e943852a255bdd9ba2.tar.gz
emacs-107fd03d986957f38257b5e943852a255bdd9ba2.zip
(Vdefine_key_rebound_commands): New variable.
(syms_of_keymap): Set up Lisp var. (Fdefine_key): Put new definition onto Vdefine_key_rebound_commands.
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 57932de4d61..114282b8f83 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -73,6 +73,12 @@ Lisp_Object Vminor_mode_map_alist;
73 documentation. */ 73 documentation. */
74Lisp_Object Vfunction_key_map; 74Lisp_Object Vfunction_key_map;
75 75
76/* A list of all commands given new bindings since a certain time
77 when nil was stored here.
78 This is used to speed up recomputation of menu key equivalents
79 when Emacs starts up. t means don't record anything here. */
80Lisp_Object Vdefine_key_rebound_commands;
81
76Lisp_Object Qkeymapp, Qkeymap, Qnon_ascii; 82Lisp_Object Qkeymapp, Qkeymap, Qnon_ascii;
77 83
78/* A char with the CHAR_META bit set in a vector or the 0200 bit set 84/* A char with the CHAR_META bit set in a vector or the 0200 bit set
@@ -594,6 +600,9 @@ the front of KEYMAP.")
594 if (length == 0) 600 if (length == 0)
595 return Qnil; 601 return Qnil;
596 602
603 if (SYMBOLP (def) && !EQ (Vdefine_key_rebound_commands, Qt))
604 Vdefine_key_rebound_commands = Fcons (def, Vdefine_key_rebound_commands);
605
597 GCPRO3 (keymap, key, def); 606 GCPRO3 (keymap, key, def);
598 607
599 if (VECTORP (key)) 608 if (VECTORP (key))
@@ -2381,6 +2390,12 @@ syms_of_keymap ()
2381 Fset (intern ("ctl-x-map"), control_x_map); 2390 Fset (intern ("ctl-x-map"), control_x_map);
2382 Ffset (intern ("Control-X-prefix"), control_x_map); 2391 Ffset (intern ("Control-X-prefix"), control_x_map);
2383 2392
2393 DEFVAR_LISP ("define-key-rebound-commands", &Vdefine_key_rebound_commands,
2394 "List of commands given new key bindings recently.\n\
2395This is used for internal purposes during Emacs startup;\n\
2396don't alter it yourself.");
2397 Vdefine_key_rebound_commands = Qt;
2398
2384 DEFVAR_LISP ("minibuffer-local-map", &Vminibuffer_local_map, 2399 DEFVAR_LISP ("minibuffer-local-map", &Vminibuffer_local_map,
2385 "Default keymap to use when reading from the minibuffer."); 2400 "Default keymap to use when reading from the minibuffer.");
2386 Vminibuffer_local_map = Fmake_sparse_keymap (Qnil); 2401 Vminibuffer_local_map = Fmake_sparse_keymap (Qnil);