diff options
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 23 |
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. */ |
| 71 | static Lisp_Object where_is_cache_keymaps; | 71 | static Lisp_Object where_is_cache_keymaps; |
| 72 | 72 | ||
| 73 | INFUN (Flookup_key, 3); | ||
| 73 | static Lisp_Object store_in_keymap (Lisp_Object, Lisp_Object, Lisp_Object); | 74 | static Lisp_Object store_in_keymap (Lisp_Object, Lisp_Object, Lisp_Object); |
| 74 | static void fix_submap_inheritance (Lisp_Object, Lisp_Object, Lisp_Object); | 75 | static 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 | ||
| 111 | DEFUN ("make-sparse-keymap", Fmake_sparse_keymap, Smake_sparse_keymap, 0, 1, 0, | 112 | DEFUE ("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. |
| 113 | Its car is `keymap' and its cdr is an alist of (CHAR . DEFINITION), | 114 | Its car is `keymap' and its cdr is an alist of (CHAR . DEFINITION), |
| 114 | which binds the character CHAR to DEFINITION, or (SYMBOL . DEFINITION), | 115 | which 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 | ||
| 163 | DEFUN ("keymap-prompt", Fkeymap_prompt, Skeymap_prompt, 1, 1, 0, | 164 | DEFUE ("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. |
| 165 | If non-nil, the prompt is shown in the echo-area | 166 | If non-nil, the prompt is shown in the echo-area |
| 166 | when reading a key-sequence to be looked-up in this keymap. */) | 167 | when 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 | ||
| 294 | DEFUN ("set-keymap-parent", Fset_keymap_parent, Sset_keymap_parent, 2, 2, 0, | 295 | DEFUE ("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. |
| 296 | Return PARENT. PARENT should be nil or another keymap. */) | 297 | Return 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 | ||
| 958 | EXFUN (Fcopy_keymap, 1); | 959 | INFUN (Fcopy_keymap, 1); |
| 959 | 960 | ||
| 960 | static Lisp_Object | 961 | static Lisp_Object |
| 961 | copy_keymap_item (Lisp_Object elt) | 962 | copy_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 | ||
| 1082 | DEFUN ("define-key", Fdefine_key, Sdefine_key, 3, 3, 0, | 1083 | DEFUE ("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. |
| 1084 | KEYMAP is a keymap. | 1085 | KEYMAP 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 | ||
| 1213 | DEFUN ("command-remapping", Fcommand_remapping, Scommand_remapping, 1, 3, 0, | 1214 | DEFUE ("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. |
| 1215 | Returns nil if COMMAND is not remapped (or not a symbol). | 1216 | Returns 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 | ||
| 1521 | DEFUN ("current-active-maps", Fcurrent_active_maps, Scurrent_active_maps, | 1522 | DEFUE ("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. |
| 1524 | OLP if non-nil indicates that we should obey `overriding-local-map' and | 1525 | OLP 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 | ||
| 1664 | DEFUN ("key-binding", Fkey_binding, Skey_binding, 1, 4, 0, | 1665 | DEFUE ("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. |
| 1666 | KEY is a string or vector, a sequence of keystrokes. | 1667 | KEY is a string or vector, a sequence of keystrokes. |
| 1667 | The binding is probably a symbol with a function definition. | 1668 | The 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 | ||
| 2181 | DEFUN ("key-description", Fkey_description, Skey_description, 1, 2, 0, | 2182 | DEFUE ("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. |
| 2183 | Optional arg PREFIX is the sequence of keys leading up to KEYS. | 2184 | Optional arg PREFIX is the sequence of keys leading up to KEYS. |
| 2184 | Control characters turn into "C-foo" sequences, meta into "M-foo", | 2185 | Control 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 | ||
| 2400 | DEFUN ("single-key-description", Fsingle_key_description, | 2401 | DEFUE ("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. |
| 2403 | Control characters turn into C-whatever, etc. | 2404 | Control 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 | ||
| 2678 | DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0, | 2679 | DEFUE ("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. |
| 2680 | If KEYMAP is a keymap, search only KEYMAP and the global keymap. | 2681 | If KEYMAP is a keymap, search only KEYMAP and the global keymap. |
| 2681 | If KEYMAP is nil, search all the currently active keymaps. | 2682 | If KEYMAP is nil, search all the currently active keymaps. |