diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-06-17 23:46:27 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-06-17 23:46:27 +0000 |
commit | f2ba34dec3db6f68aabb6ec0b2101e5b444f05df (patch) | |
tree | 20ea3776c32545cc46cfa40e51544b7dc907e84c /src/keymap.c | |
parent | b56f13344a9bc99f170110a333b9648276cdbc18 (diff) | |
download | emacs-f2ba34dec3db6f68aabb6ec0b2101e5b444f05df.tar.gz |
(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/keymap.c')
-rw-r--r-- | src/keymap.c | 15 |
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; documentation. */ Lisp_Object Vfunction_key_map; +/* A list of all commands given new bindings since a certain time + when nil was stored here. + This is used to speed up recomputation of menu key equivalents + when Emacs starts up. t means don't record anything here. */ +Lisp_Object Vdefine_key_rebound_commands; + Lisp_Object Qkeymapp, Qkeymap, Qnon_ascii; /* A char with the CHAR_META bit set in a vector or the 0200 bit set @@ -594,6 +600,9 @@ the front of KEYMAP.") if (length == 0) return Qnil; + if (SYMBOLP (def) && !EQ (Vdefine_key_rebound_commands, Qt)) + Vdefine_key_rebound_commands = Fcons (def, Vdefine_key_rebound_commands); + GCPRO3 (keymap, key, def); if (VECTORP (key)) @@ -2381,6 +2390,12 @@ syms_of_keymap () Fset (intern ("ctl-x-map"), control_x_map); Ffset (intern ("Control-X-prefix"), control_x_map); + DEFVAR_LISP ("define-key-rebound-commands", &Vdefine_key_rebound_commands, + "List of commands given new key bindings recently.\n\ +This is used for internal purposes during Emacs startup;\n\ +don't alter it yourself."); + Vdefine_key_rebound_commands = Qt; + DEFVAR_LISP ("minibuffer-local-map", &Vminibuffer_local_map, "Default keymap to use when reading from the minibuffer."); Vminibuffer_local_map = Fmake_sparse_keymap (Qnil); |