comparison src/keymap.c @ 56635:a8be0bc345d2

(Fmake_keymap, Fmap_keymap, Fwhere_is_internal): Doc fixes.
author Luc Teirlinck <teirllm@auburn.edu>
date Mon, 09 Aug 2004 18:42:04 +0000
parents 166ae6765a44
children 3965acfc4e80 3b9f4bbca1bf 3fd4a5c21153
comparison
equal deleted inserted replaced
56634:056555472800 56635:a8be0bc345d2
128 128
129 /* Keymap object support - constructors and predicates. */ 129 /* Keymap object support - constructors and predicates. */
130 130
131 DEFUN ("make-keymap", Fmake_keymap, Smake_keymap, 0, 1, 0, 131 DEFUN ("make-keymap", Fmake_keymap, Smake_keymap, 0, 1, 0,
132 doc: /* Construct and return a new keymap, of the form (keymap CHARTABLE . ALIST). 132 doc: /* Construct and return a new keymap, of the form (keymap CHARTABLE . ALIST).
133 CHARTABLE is a char-table that holds the bindings for the ASCII 133 CHARTABLE is a char-table that holds the bindings for all characters
134 characters. ALIST is an assoc-list which holds bindings for function keys, 134 without modifiers. All entries in it are initially nil, meaning
135 mouse events, and any other things that appear in the input stream. 135 "command undefined". ALIST is an assoc-list which holds bindings for
136 All entries in it are initially nil, meaning "command undefined". 136 function keys, mouse events, and any other things that appear in the
137 input stream. Initially, ALIST is nil.
137 138
138 The optional arg STRING supplies a menu name for the keymap 139 The optional arg STRING supplies a menu name for the keymap
139 in case you use it as a menu with `x-popup-menu'. */) 140 in case you use it as a menu with `x-popup-menu'. */)
140 (string) 141 (string)
141 Lisp_Object string; 142 Lisp_Object string;
726 call2 (fun, key, val); 727 call2 (fun, key, val);
727 } 728 }
728 729
729 DEFUN ("map-keymap", Fmap_keymap, Smap_keymap, 2, 2, 0, 730 DEFUN ("map-keymap", Fmap_keymap, Smap_keymap, 2, 2, 0,
730 doc: /* Call FUNCTION for every binding in KEYMAP. 731 doc: /* Call FUNCTION for every binding in KEYMAP.
731 FUNCTION is called with two arguments: the event and its binding. */) 732 FUNCTION is called with two arguments: the event and its binding.
733 If KEYMAP has a parent, the parent's bindings are included as well.
734 This works recursively: if the parent has itself a parent, then the
735 grandparent's bindings are also included and so on. */)
732 (function, keymap) 736 (function, keymap)
733 Lisp_Object function, keymap; 737 Lisp_Object function, keymap;
734 { 738 {
735 if (INTEGERP (function)) 739 if (INTEGERP (function))
736 /* We have to stop integers early since map_keymap gives them special 740 /* We have to stop integers early since map_keymap gives them special
2570 return found; 2574 return found;
2571 } 2575 }
2572 2576
2573 DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0, 2577 DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0,
2574 doc: /* Return list of keys that invoke DEFINITION. 2578 doc: /* Return list of keys that invoke DEFINITION.
2575 If KEYMAP is non-nil, search only KEYMAP and the global keymap. 2579 If KEYMAP is a keymap, search only KEYMAP and the global keymap.
2576 If KEYMAP is nil, search all the currently active keymaps. 2580 If KEYMAP is nil, search all the currently active keymaps.
2577 If KEYMAP is a list of keymaps, search only those keymaps. 2581 If KEYMAP is a list of keymaps, search only those keymaps.
2578 2582
2579 If optional 3rd arg FIRSTONLY is non-nil, return the first key sequence found, 2583 If optional 3rd arg FIRSTONLY is non-nil, return the first key sequence found,
2580 rather than a list of all possible key sequences. 2584 rather than a list of all possible key sequences.
2581 If FIRSTONLY is the symbol `non-ascii', return the first binding found, 2585 If FIRSTONLY is the symbol `non-ascii', return the first binding found,
2582 no matter what it is. 2586 no matter what it is.
2583 If FIRSTONLY has another non-nil value, prefer sequences of ASCII characters, 2587 If FIRSTONLY has another non-nil value, prefer sequences of ASCII characters
2584 and entirely reject menu bindings. 2588 \(or their meta variants) and entirely reject menu bindings.
2585 2589
2586 If optional 4th arg NOINDIRECT is non-nil, don't follow indirections 2590 If optional 4th arg NOINDIRECT is non-nil, don't follow indirections
2587 to other keymaps or slots. This makes it possible to search for an 2591 to other keymaps or slots. This makes it possible to search for an
2588 indirect definition itself. 2592 indirect definition itself.
2589 2593