1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 15:00:45 -08:00
Commit graph

229 commits

Author SHA1 Message Date
Gerd Moellmann
e15e282807 (Fsingle_key_description): NUL-terminate the string
buffer before calling build_string.
2001-05-29 14:09:54 +00:00
Gerd Moellmann
3d9d7a9b30 (Fsingle_key_description): Create a multibyte string
only if necessary.
2001-05-28 16:21:41 +00:00
Gerd Moellmann
d4ae91d2ce (Fsingle_key_description): Replace a build_string with
a make_multibyte_string.  From Kenichi Handa <handa@etl.go.jp>.
2001-05-16 10:49:21 +00:00
Stefan Monnier
fc18e5470d (Faccessible_keymaps): Pass `is_metized' to accessible_keymaps_char_table.
(accessible_keymaps_char_table): Obey `is_metized'.
(where_is_internal, Fwhere_is_internal): Don't confuse int and Lisp_Object.
2001-02-26 17:16:00 +00:00
Stefan Monnier
f58c64946e *** empty log message *** 2001-02-26 17:07:47 +00:00
Stefan Monnier
2ba11bbdcb (where_is_internal): Accept non-ascii integer prefixes. 2001-02-24 17:07:29 +00:00
Stefan Monnier
60dc655805 (Fwhere_is_internal): Use the first valid binding
if no ascii binding is found (when firstonly is t).
2001-01-31 15:19:30 +00:00
Gerd Moellmann
fdbbf26657 Undo last change. 2001-01-29 20:04:42 +00:00
Gerd Moellmann
341e4f2465 (mouse_key_p): New function.
(where_is_internal, Fwhere_is_internal): Use it.
2001-01-29 19:52:22 +00:00
Dave Love
0482803f6b (Fwhere_is_internal): Declare gcpro3, gcpro4. 2001-01-25 12:58:22 +00:00
Gerd Moellmann
f9aaedb634 (Fwhere_is_internal): Don't nreverse the cached
value in where_is_cache; the next lookup in the cache returns
something bogus if we do.
2001-01-24 19:42:17 +00:00
Gerd Moellmann
4956d1efe2 Call get_local_map with new argument list.
(Fwhere_is_internal): Rename parameter XKEYMAP to KEYMAP.
2001-01-12 11:19:36 +00:00
Gerd Moellmann
f1cb0a2584 (push_key_description): Add parameter FORCE_MULTIBYTE.
If set, print multibyte text.
(Fsingle_key_description): Call push_key_description with
FORCE_MULTIBYTE set.
(describe_buffer_bindings): Likewise.
2000-12-28 13:38:55 +00:00
Kenichi Handa
588fc8bdf0 (push_key_description): Don't convert eight-bit-control
and eight-bit-graphic to multibyte character.
2000-12-21 01:58:28 +00:00
Stefan Monnier
88416888aa (where_is_internal): Check ascii_sequence_p rather than
excluding menu-bar and tool-bar.
(Fwhere_is_internal): Check ascii_sequence_p when looking up the cache.
(menu_item_p): Remove.
(where_is_internal_1): Don't ignore menu-items.
2000-12-20 22:46:44 +00:00
Stefan Monnier
d5b3eb1b54 (get_keyelt): Only eval the filter if `autoload' is set. 2000-12-13 14:13:18 +00:00
Gerd Moellmann
6e80fddb98 (Fkey_description): If KEYS is an empty key sequence,
return an empty string.
2000-12-11 15:21:46 +00:00
Gerd Moellmann
ee89188f29 (current_minor_maps): Use malloc. Prevent a leak. 2000-12-08 09:58:28 +00:00
Ken Raeburn
ae0b9b4690 * undo.c (record_delete): Check that last_undo_buffer is really a buffer before
applying XBUFFER to it.

* keymap.c (where_is_internal): Pass lisp object, not integer, to Faref.
2000-10-27 23:01:20 +00:00
Stefan Monnier
020676925c * lisp.h (KEYMAPP): New macro.
(get_keymap): Remove.
(get_keymap_1): Rename get_keymap.
* keyboard.h (get_keymap_1, Fkeymapp): Remove prototype.
* xterm.c (note_mode_line_highlight): Use KEYMAPP.
* xmenu.c (single_submenu): Use KEYMAPP.
(Fx_popup_menu): Fetch keymaps rather than checking Fkeymapp.
Use KEYMAPP rather than Fkeymapp.
* w32term.c (note_mode_line_highlight): Use KEYMAPP.
* w32menu.c (True, False): Remove (use TRUE and FALSE instead).
(Fx_popup_menu): Fetch keymaps rather than checking Fkeymapp.
Use KEYMAPP rather than Fkeymapp.
(single_submenu): Use KEYMAPP.
(w32_menu_show, w32_dialog_show): Use TRUE.
* minibuf.c (Fread_from_minibuffer): Update call to get_keymap.
* keymap.c (KEYMAPP): Remove (moved to lisp.h).
(Fkeymapp): Use KEYMAPP.
(get_keymap): Rename from get_keymap_1.  Remove old def.
Return t when autoload=0 and error=0 and the keymap needs autoloading.
(Fcopy_keymap): Check (eq (car x) 'keymap) rather than using Fkeymapp.
(Fminor_mode_key_binding): Don't raise an error if the binding
is not a keymap.
(Fuse_global_map, Fuse_local_map): Allow autoloading.
(Faccessible_keymaps): Fetch keymaps rather than checking Fkeymapp.
* keyboard.c (read_char): get_keymap_1 -> get_keymap.
Allow Vspecial_event_map to be autoloaded.
(menu_bar_items): Fetch the keymap rather than using keymapp.
(menu_bar_one_keymap): No need to follow func-indirect any more.
(parse_menu_item): get_keymap_1 -> get_keymap.
(tool_bar_items): Fetch the keymap rather than using keymapp.
(read_key_sequence): Use KEYMAPP.
* intervals.c (get_local_map): Use get_keymap rather than following
function-indirections explicitly.
* doc.c (Fsubstitute_command_keys): get_keymap_1 -> get_keymap.
2000-10-27 22:20:19 +00:00
Stefan Monnier
1e7d1ab059 (where_is_cache, where_is_cache_keymaps): New vars.
(Fset_keymap_parent, store_in_keymap): Flush the where-is cache.
(where_is_internal): Renamed from Fwhere_is_internal.
Don't DEFUN any more. Arg `xkeymap' replaced by `keymaps'.
(Fwhere_is_internal): New function wrapping where_is_internal.
(where_is_internal_1): Handle the case where we're filling the cache.
(syms_of_keymap): Init and gcpro the where_is_cache(|_keymaps).
2000-10-25 23:35:21 +00:00
Stefan Monnier
4980114564 Use AREF, ASET and ASIZE macros.
(Fmake_sparse_keymap): Docstring fix.
(synkey): Remove.
(shadow_lookup): Move up.
Handle the case where lookup-key returns an integer.
(where_is_internal_1): Drop arg `keymap'. Don't check shadowing.
(where_is_internal_2): Adapt to fewer args for where_is_internal_1.
(Fwhere_is_internal): Allow `xkeymap' to be a list of keymaps.
Simplify/rewrite the keymap-finding code.
Add check for command shadowing, using shadow_lookup.
2000-10-25 04:42:23 +00:00
Stefan Monnier
320c9428b4 (fix_submap_inheritance): Use get_keymap_1 on parent_entry
rather than KEYMAPP, to allow EQ to work correctly if parent_entry is
a symbol.
2000-10-25 03:02:17 +00:00
Gerd Moellmann
11adc31054 Update copyright. 2000-10-24 12:32:33 +00:00
Stefan Monnier
9d0ffdd99f (fix_submap_inheritance): Don't do anything if parent_entry
is nil: since we go to the end of submap anyway, we'd end up
setting nil to nil.
(access_keymap): Don't use KEYMAPP on meta_map since KEYMAPP
doesn't obey autoload.
2000-10-22 04:48:48 +00:00
Gerd Moellmann
7396a36c10 (access_keymap): If IDX has a meta prefix, and there's
no map for meta_prefix_char, don't try to use it as a keymap.
Instead, if T_OK is non-zero, look up a default binding, if any,
otherwise, if T_OK is zero, return nil.
2000-10-18 14:20:53 +00:00
Stefan Monnier
7e05cdaf48 (keymap_memberp): Ensure that nil is not a member. 2000-10-16 21:57:56 +00:00
Stefan Monnier
1ed6d8ef37 (Fkeymap_parent): Undefined autoload -> 1. 2000-10-15 03:34:18 +00:00
Stefan Monnier
db785038bb * keymap.c (access_keymap): Add AUTOLOAD parameter.
Do the meta->esc mapping.  Call get_keyelt before returning.
Start scanning from the second element (the first is always `keymap')
to make it easier to detect when we reach a parent map.
Handle the case of inheriting from a symbol whose function is a map.
(Fkeymap_parent): Also handle the `inherit from symbol' case.
(fix_submap_inheritance, Fdefine_key): Update call to access_keymap.
(get_keyelt, Flookup_key): Update call to access_keymap.
Remove the meta->esc mappings.
(define_as_prefix): Delete old disabled code.
(menu_item_p): New function.
(where_is_internal_1): Skip over the few remaining menu items.
* lisp.h (access_keymap): Update prototype.
* keyboard.c (read_char, menu_bar_items, tool_bar_items):
Update call to access_keymap.
(follow_key, read_key_sequence): Update calls to access_keymap.
Remove the meta->esc mappings.
2000-10-15 03:31:32 +00:00
Stefan Monnier
35810b6fff (Fwhere_is_internal): Ignore menu-bar' and tool-bar'.
(where_is_internal_1): Don't bother ignoring menu-items any more.
2000-10-04 23:16:46 +00:00
Stefan Monnier
b1904cd946 (keymap_memberp): New function.
(Fset_keymap_parent): Use it.
(fix_submap_inheritance): Use get_keyelt, get_keymap_1 and KEYMAPP.
Use keymap_memberp to avoid creating cycles.
(access_keymap): Use KEYMAPP.
2000-09-30 17:00:32 +00:00
Kenichi Handa
6f5ac60d61 Remove the line "#undef NULL". 2000-09-29 06:47:05 +00:00
Gerd Moellmann
6bbd7a2959 Avoid some more compiler warnings. 2000-09-21 20:54:57 +00:00
Gerd Moellmann
3015eec0e8 (Fset_keymap_parent): Check for cycles in keymap
inheritance.
2000-09-08 13:30:21 +00:00
Dave Love
2d9296941c (store_in_keymap): Add `static' to declaration. 2000-08-28 18:40:21 +00:00
Stefan Monnier
5749539688 (store_in_keymap, fix_submap_inheritance): New prototypes.
(KEYMAPP): New macro.
(Fkeymap_parent, Fset_keymap_parent): Use it.
(fix_submap_inheritance): Mark it static.
(define_as_prefix, describe_buffer_bindings, describe_command)
(describe_translation, describe_map): Complete prototypes.
2000-08-27 16:21:55 +00:00
Gerd Moellmann
bc89c6093d (push_key_description): If C without modifiers is < 32,
make sure to print `C-' before `M-', like in the manual.
2000-08-14 12:44:38 +00:00
Gerd Moellmann
9731fda59f (current_minor_maps): Use xmalloc instead of malloc. 2000-08-05 19:27:01 +00:00
Gerd Moellmann
c1848a97e5 (Fsingle_key_description): Add parameter NO_ANGLES.
Callers changed.
2000-08-02 20:16:40 +00:00
Gerd Moellmann
df75b1a379 (get_keymap_1): Add comment that this function can GC.
(where_is_internal_2, where_is_internal_1): Add GCPROs, add
comment that functions can GC.
(Fset_keymap_parent): GCPRO arg KEYMAP.
2000-07-10 14:14:35 +00:00
Gerd Moellmann
5365473301 (get_keyelt): Temporarily inhibit GC while evaluating
a menu filter.
2000-07-04 12:08:25 +00:00
Gerd Moellmann
3fc720e4bd (get_keyelt): For menu-items containing a `:filter
FILTER', apply FILTER to the menu-item's definition to get the
real definition to use.
2000-06-26 15:05:03 +00:00
Ken Raeburn
140c4ac6f3 * keyboard.c (follow_key, read_key_sequence): Use XUINT on key value, or checks
for CHAR_META will fail.
* keymap.c (get_keyelt): Likewise.
2000-06-19 07:16:27 +00:00
Ken Raeburn
dc1741f3a3 fix shadowing of 'keymap' enum value 2000-06-18 20:14:35 +00:00
Gerd Moellmann
97d4edaaa3 (describe_buffer_bindings): Add `\f\n' in front of titles. 2000-06-16 15:17:41 +00:00
Gerd Moellmann
c7edb9605f (Fsingle_key_description): Enclose function key and
event symbol names in angle brackets.
2000-06-14 13:35:45 +00:00
Dave Love
93d2aa1c9b Include intervals.h.
(Fkey_binding, Fwhere_is_internal): Deal with `keymap' property.
2000-05-29 11:54:51 +00:00
Kenichi Handa
54e03a4ac4 (Fsingle_key_description): Use SPLIT_CHAR instead of
SPLIT_NON_ASCII_CHAR.
(describe_vector): Use MAKE_CHAR instead of MAKE_NON_ASCII_CHAR.
(Faccessible_keymaps): Use FETCH_STRING_CHAR_ADVANCE
unconditionally.
(Fkey_description): Likewise.
2000-05-20 00:03:16 +00:00
Kenichi Handa
0a16479ffe (push_key_description): Adjusted for the change of
CHAR_STRING.
(Ftext_char_description): Likewise.
1999-12-15 00:15:57 +00:00
Kenichi Handa
d2d9586a77 (Fsingle_key_description): Use KEY_DESCRIPTION_SIZE to
allocate memory for push_key_description.
(describe_buffer_bindings): Likewise.
1999-11-18 05:10:13 +00:00