aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 10000b935aa..9adf2898736 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -70,6 +70,7 @@ static Lisp_Object where_is_cache;
70/* Which keymaps are reverse-stored in the cache. */ 70/* Which keymaps are reverse-stored in the cache. */
71static Lisp_Object where_is_cache_keymaps; 71static Lisp_Object where_is_cache_keymaps;
72 72
73INFUN (Flookup_key, 3);
73static Lisp_Object store_in_keymap (Lisp_Object, Lisp_Object, Lisp_Object); 74static Lisp_Object store_in_keymap (Lisp_Object, Lisp_Object, Lisp_Object);
74static void fix_submap_inheritance (Lisp_Object, Lisp_Object, Lisp_Object); 75static void fix_submap_inheritance (Lisp_Object, Lisp_Object, Lisp_Object);
75 76
@@ -108,7 +109,7 @@ in case you use it as a menu with `x-popup-menu'. */)
108 Fcons (Fmake_char_table (Qkeymap, Qnil), tail)); 109 Fcons (Fmake_char_table (Qkeymap, Qnil), tail));
109} 110}
110 111
111DEFUN ("make-sparse-keymap", Fmake_sparse_keymap, Smake_sparse_keymap, 0, 1, 0, 112DEFUE ("make-sparse-keymap", Fmake_sparse_keymap, Smake_sparse_keymap, 0, 1, 0,
112 doc: /* Construct and return a new sparse keymap. 113 doc: /* Construct and return a new sparse keymap.
113Its car is `keymap' and its cdr is an alist of (CHAR . DEFINITION), 114Its car is `keymap' and its cdr is an alist of (CHAR . DEFINITION),
114which binds the character CHAR to DEFINITION, or (SYMBOL . DEFINITION), 115which binds the character CHAR to DEFINITION, or (SYMBOL . DEFINITION),
@@ -160,7 +161,7 @@ is also allowed as an element. */)
160 return (KEYMAPP (object) ? Qt : Qnil); 161 return (KEYMAPP (object) ? Qt : Qnil);
161} 162}
162 163
163DEFUN ("keymap-prompt", Fkeymap_prompt, Skeymap_prompt, 1, 1, 0, 164DEFUE ("keymap-prompt", Fkeymap_prompt, Skeymap_prompt, 1, 1, 0,
164 doc: /* Return the prompt-string of a keymap MAP. 165 doc: /* Return the prompt-string of a keymap MAP.
165If non-nil, the prompt is shown in the echo-area 166If non-nil, the prompt is shown in the echo-area
166when reading a key-sequence to be looked-up in this keymap. */) 167when reading a key-sequence to be looked-up in this keymap. */)
@@ -291,7 +292,7 @@ keymap_memberp (Lisp_Object map, Lisp_Object maps)
291 292
292/* Set the parent keymap of MAP to PARENT. */ 293/* Set the parent keymap of MAP to PARENT. */
293 294
294DEFUN ("set-keymap-parent", Fset_keymap_parent, Sset_keymap_parent, 2, 2, 0, 295DEFUE ("set-keymap-parent", Fset_keymap_parent, Sset_keymap_parent, 2, 2, 0,
295 doc: /* Modify KEYMAP to set its parent map to PARENT. 296 doc: /* Modify KEYMAP to set its parent map to PARENT.
296Return PARENT. PARENT should be nil or another keymap. */) 297Return PARENT. PARENT should be nil or another keymap. */)
297 (Lisp_Object keymap, Lisp_Object parent) 298 (Lisp_Object keymap, Lisp_Object parent)
@@ -955,7 +956,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
955 return def; 956 return def;
956} 957}
957 958
958EXFUN (Fcopy_keymap, 1); 959INFUN (Fcopy_keymap, 1);
959 960
960static Lisp_Object 961static Lisp_Object
961copy_keymap_item (Lisp_Object elt) 962copy_keymap_item (Lisp_Object elt)
@@ -1079,7 +1080,7 @@ is not copied. */)
1079 1080
1080/* GC is possible in this function if it autoloads a keymap. */ 1081/* GC is possible in this function if it autoloads a keymap. */
1081 1082
1082DEFUN ("define-key", Fdefine_key, Sdefine_key, 3, 3, 0, 1083DEFUE ("define-key", Fdefine_key, Sdefine_key, 3, 3, 0,
1083 doc: /* In KEYMAP, define key sequence KEY as DEF. 1084 doc: /* In KEYMAP, define key sequence KEY as DEF.
1084KEYMAP is a keymap. 1085KEYMAP is a keymap.
1085 1086
@@ -1210,7 +1211,7 @@ binding KEY to DEF is added at the front of KEYMAP. */)
1210 1211
1211/* This function may GC (it calls Fkey_binding). */ 1212/* This function may GC (it calls Fkey_binding). */
1212 1213
1213DEFUN ("command-remapping", Fcommand_remapping, Scommand_remapping, 1, 3, 0, 1214DEFUE ("command-remapping", Fcommand_remapping, Scommand_remapping, 1, 3, 0,
1214 doc: /* Return the remapping for command COMMAND. 1215 doc: /* Return the remapping for command COMMAND.
1215Returns nil if COMMAND is not remapped (or not a symbol). 1216Returns nil if COMMAND is not remapped (or not a symbol).
1216 1217
@@ -1518,7 +1519,7 @@ current_minor_maps (Lisp_Object **modeptr, Lisp_Object **mapptr)
1518 return i; 1519 return i;
1519} 1520}
1520 1521
1521DEFUN ("current-active-maps", Fcurrent_active_maps, Scurrent_active_maps, 1522DEFUE ("current-active-maps", Fcurrent_active_maps, Scurrent_active_maps,
1522 0, 2, 0, 1523 0, 2, 0,
1523 doc: /* Return a list of the currently active keymaps. 1524 doc: /* Return a list of the currently active keymaps.
1524OLP if non-nil indicates that we should obey `overriding-local-map' and 1525OLP if non-nil indicates that we should obey `overriding-local-map' and
@@ -1661,7 +1662,7 @@ like in the respective argument of `key-binding'. */)
1661 1662
1662/* GC is possible in this function if it autoloads a keymap. */ 1663/* GC is possible in this function if it autoloads a keymap. */
1663 1664
1664DEFUN ("key-binding", Fkey_binding, Skey_binding, 1, 4, 0, 1665DEFUE ("key-binding", Fkey_binding, Skey_binding, 1, 4, 0,
1665 doc: /* Return the binding for command KEY in current keymaps. 1666 doc: /* Return the binding for command KEY in current keymaps.
1666KEY is a string or vector, a sequence of keystrokes. 1667KEY is a string or vector, a sequence of keystrokes.
1667The binding is probably a symbol with a function definition. 1668The binding is probably a symbol with a function definition.
@@ -2178,7 +2179,7 @@ Lisp_Object Qsingle_key_description, Qkey_description;
2178 2179
2179/* This function cannot GC. */ 2180/* This function cannot GC. */
2180 2181
2181DEFUN ("key-description", Fkey_description, Skey_description, 1, 2, 0, 2182DEFUE ("key-description", Fkey_description, Skey_description, 1, 2, 0,
2182 doc: /* Return a pretty description of key-sequence KEYS. 2183 doc: /* Return a pretty description of key-sequence KEYS.
2183Optional arg PREFIX is the sequence of keys leading up to KEYS. 2184Optional arg PREFIX is the sequence of keys leading up to KEYS.
2184Control characters turn into "C-foo" sequences, meta into "M-foo", 2185Control characters turn into "C-foo" sequences, meta into "M-foo",
@@ -2397,7 +2398,7 @@ push_key_description (register unsigned int c, register char *p, int force_multi
2397 2398
2398/* This function cannot GC. */ 2399/* This function cannot GC. */
2399 2400
2400DEFUN ("single-key-description", Fsingle_key_description, 2401DEFUE ("single-key-description", Fsingle_key_description,
2401 Ssingle_key_description, 1, 2, 0, 2402 Ssingle_key_description, 1, 2, 0,
2402 doc: /* Return a pretty description of command character KEY. 2403 doc: /* Return a pretty description of command character KEY.
2403Control characters turn into C-whatever, etc. 2404Control characters turn into C-whatever, etc.
@@ -2675,7 +2676,7 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps,
2675 2676
2676/* This function can GC if Flookup_key autoloads any keymaps. */ 2677/* This function can GC if Flookup_key autoloads any keymaps. */
2677 2678
2678DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0, 2679DEFUE ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0,
2679 doc: /* Return list of keys that invoke DEFINITION. 2680 doc: /* Return list of keys that invoke DEFINITION.
2680If KEYMAP is a keymap, search only KEYMAP and the global keymap. 2681If KEYMAP is a keymap, search only KEYMAP and the global keymap.
2681If KEYMAP is nil, search all the currently active keymaps. 2682If KEYMAP is nil, search all the currently active keymaps.