Mercurial > hg > xemacs-beta
comparison src/keymap.c @ 444:576fb035e263 r21-2-37
Import from CVS: tag r21-2-37
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:36:19 +0200 |
parents | abe6d1db359e |
children | 1ccc32a20af4 |
comparison
equal
deleted
inserted
replaced
443:a8296e22da4e | 444:576fb035e263 |
---|---|
793 } | 793 } |
794 | 794 |
795 DEFUN ("make-sparse-keymap", Fmake_sparse_keymap, 0, 1, 0, /* | 795 DEFUN ("make-sparse-keymap", Fmake_sparse_keymap, 0, 1, 0, /* |
796 Construct and return a new keymap object. | 796 Construct and return a new keymap object. |
797 All entries in it are nil, meaning "command undefined". The only | 797 All entries in it are nil, meaning "command undefined". The only |
798 difference between this function and make-keymap is that this function | 798 difference between this function and `make-keymap' is that this function |
799 returns a "smaller" keymap (one that is expected to contain fewer | 799 returns a "smaller" keymap (one that is expected to contain fewer |
800 entries). As keymaps dynamically resize, the distinction is not great. | 800 entries). As keymaps dynamically resize, this distinction is not great. |
801 | 801 |
802 Optional argument NAME specifies a name to assign to the keymap, | 802 Optional argument NAME specifies a name to assign to the keymap, |
803 as in `set-keymap-name'. This name is only a debugging convenience; | 803 as in `set-keymap-name'. This name is only a debugging convenience; |
804 it is not used except when printing the keymap. | 804 it is not used except when printing the keymap. |
805 */ | 805 */ |
966 keymap = get_keymap (keymap, 1, 1); | 966 keymap = get_keymap (keymap, 1, 1); |
967 return XKEYMAP (keymap)->default_binding; | 967 return XKEYMAP (keymap)->default_binding; |
968 } | 968 } |
969 | 969 |
970 DEFUN ("keymapp", Fkeymapp, 1, 1, 0, /* | 970 DEFUN ("keymapp", Fkeymapp, 1, 1, 0, /* |
971 Return t if ARG is a keymap object. | 971 Return t if OBJECT is a keymap object. |
972 The keymap may be autoloaded first if necessary. | 972 The keymap may be autoloaded first if necessary. |
973 */ | 973 */ |
974 (object)) | 974 (object)) |
975 { | 975 { |
976 /* This function can GC */ | 976 /* This function can GC */ |
2179 In keymap KEYMAP, look up key-sequence KEYS. Return the definition. | 2179 In keymap KEYMAP, look up key-sequence KEYS. Return the definition. |
2180 Nil is returned if KEYS is unbound. See documentation of `define-key' | 2180 Nil is returned if KEYS is unbound. See documentation of `define-key' |
2181 for valid key definitions and key-sequence specifications. | 2181 for valid key definitions and key-sequence specifications. |
2182 A number is returned if KEYS is "too long"; that is, the leading | 2182 A number is returned if KEYS is "too long"; that is, the leading |
2183 characters fail to be a valid sequence of prefix characters in KEYMAP. | 2183 characters fail to be a valid sequence of prefix characters in KEYMAP. |
2184 The number is how many characters at the front of KEYS | 2184 The number is how many key strokes at the front of KEYS it takes to |
2185 it takes to reach a non-prefix command. | 2185 reach a non-prefix command. |
2186 */ | 2186 */ |
2187 (keymap, keys, accept_default)) | 2187 (keymap, keys, accept_default)) |
2188 { | 2188 { |
2189 /* This function can GC */ | 2189 /* This function can GC */ |
2190 if (VECTORP (keys)) | 2190 if (VECTORP (keys)) |
2533 the documentation for `lookup-key' for more information. | 2533 the documentation for `lookup-key' for more information. |
2534 | 2534 |
2535 For key-presses, the order of keymaps searched is: | 2535 For key-presses, the order of keymaps searched is: |
2536 - the `keymap' property of any extent(s) at point; | 2536 - the `keymap' property of any extent(s) at point; |
2537 - any applicable minor-mode maps; | 2537 - any applicable minor-mode maps; |
2538 - the current-local-map of the current-buffer; | 2538 - the current local map of the current-buffer; |
2539 - the current global map. | 2539 - the current global map. |
2540 | 2540 |
2541 For mouse-clicks, the order of keymaps searched is: | 2541 For mouse-clicks, the order of keymaps searched is: |
2542 - the current-local-map of the `mouse-grabbed-buffer' if any; | 2542 - the current-local-map of the `mouse-grabbed-buffer' if any; |
2543 - vertical-divider-map, if the event happened over a vertical divider | 2543 - vertical-divider-map, if the event happened over a vertical divider |
2544 - the `keymap' property of any extent(s) at the position of the click | 2544 - the `keymap' property of any extent(s) at the position of the click |
2545 (this includes modeline extents); | 2545 (this includes modeline extents); |
2546 - the modeline-map of the buffer corresponding to the modeline under | 2546 - the modeline-map of the buffer corresponding to the modeline under |
2547 the mouse (if the click happened over a modeline); | 2547 the mouse (if the click happened over a modeline); |
2548 - the value of toolbar-map in the current-buffer (if the click | 2548 - the value of `toolbar-map' in the current-buffer (if the click |
2549 happened over a toolbar); | 2549 happened over a toolbar); |
2550 - the current-local-map of the buffer under the mouse (does not | 2550 - the current local map of the buffer under the mouse (does not |
2551 apply to toolbar clicks); | 2551 apply to toolbar clicks); |
2552 - any applicable minor-mode maps; | 2552 - any applicable minor-mode maps; |
2553 - the current global map. | 2553 - the current global map. |
2554 | 2554 |
2555 Note that if `overriding-local-map' or `overriding-terminal-local-map' | 2555 Note that if `overriding-local-map' or `overriding-terminal-local-map' |