Commit graph

613 commits

Author SHA1 Message Date
Gerd Moellmann
18f534df4d (delete_kboard): Handle the case that selected_frame
has been deleted in the course of x_connection_closed.
2001-05-07 13:43:10 +00:00
Gerd Moellmann
be2488ca37 (command_loop_1): Redo change of 2001-03-12. 2001-04-25 14:36:32 +00:00
Gerd Moellmann
a122a38eee (delete_kboard): Prevent a dangling reference
from current_kboard to KB, which is freed.
2001-04-19 13:00:29 +00:00
Gerd Moellmann
c843d6c65b (echoing, echo_message_buffer): Make externally
visible.
2001-04-04 14:04:38 +00:00
Gerd Moellmann
d0bbfc999a (timer_check): Preserve the value of deactivate-mark.
(command_loop_1): Undo last change.
2001-03-15 16:31:51 +00:00
Gerd Moellmann
827c686c14 (quit_throw_to_read_char): Change call to
do_switch_frame to new format.
2001-03-14 16:35:40 +00:00
Gerd Moellmann
a7b772c166 (command_loop_1): Set Vdeactivate_mark to nil
before running the command; timer functions or process
filters may have set it.
2001-03-12 15:14:11 +00:00
Eli Zaretskii
5141f9d0fb (syms_of_keyboard) <overriding-local-map>: Doc fix. 2001-03-12 14:48:45 +00:00
Gerd Moellmann
db14cfc515 (make_lispy_event): Add string info to the event,
analogous to what's done on mode lines.
(read_key_sequence): For a click on a string, consider `local-map'
and `keymap' of that string.
2001-03-09 18:43:47 +00:00
Gerd Moellmann
a955ffa20c (make_lispy_event, make_lispy_movement): Adjust
calls to buffer_posn_from_coords to new format.
2001-03-09 14:51:01 +00:00
Gerd Moellmann
129004d3cb (make_lispy_event): Avoid generating drag events
if the mouse hasn't actually moved to another buffer position.
2001-03-08 14:03:45 +00:00
Gerd Moellmann
526a058f12 Use display_hourglass_p, start_hourglass,
cancel_hourglass instead of the old names.
2001-02-21 13:57:40 +00:00
Gerd Moellmann
d17e49a898 (read_char): When an event from unread-command-events
is from the tool or menu bar, set *USE_MOUSE_MENU to 1.
2001-02-20 18:12:44 +00:00
Gerd Moellmann
980a2d69dd (recursive_edit_1): Bind `inhibit-redisplay' and
set redisplaying_p to 0 here instead of in Frecursive_edit.
(Frecursive_edit): Don't bind `inhibit-redisplay' and don't
set redisplaying_p.
2001-02-19 13:58:17 +00:00
Gerd Moellmann
3007ebfbc7 Call redisplay_preserve_echo_area with additional arg. 2001-01-16 12:42:22 +00:00
Gerd Moellmann
24a40fbb28 Call get_local_map with new argument list. 2001-01-12 11:17:53 +00:00
Gerd Moellmann
c970a76059 (Fexecute_extended_command): Use a
record_unwind_protect to ensure that pop_message is called.
2001-01-09 13:44:36 +00:00
Dave Love
64d4ec0fe1 (Fread_key_sequence_vector): Avoid newline in
arglist, for documentation's sake.
2001-01-07 21:15:54 +00:00
Eli Zaretskii
aebfea6874 (record_char): Remove unused function-scope variable
`help'.
(kbd_buffer_get_event): Remove unused block-scope variable `idx'.
(menu_bar_items): Remove unused function-scope variable `tem'.
2001-01-02 14:09:59 +00:00
Gerd Moellmann
5a7cb8f13d (echo_char): If C is an integer, always call
push_key_description.  Former code could signal an invalid
character error.
2000-12-28 13:37:33 +00:00
Gerd Moellmann
f717c2baaa (echo_prompt): Always set current_kboard->echoptr to
the end of the prompt.  Set echo_after_prompt to the offset
of echoptr in echobuf.
2000-12-23 23:09:04 +00:00
Gerd Moellmann
102d8a2216 (echo_prompt): Prevent a compiler warning. 2000-12-20 15:13:36 +00:00
Kenichi Handa
a4ef85ee19 (echo_prompt): Argument type changed to Lisp_Object.
Always store string in multibyte representation in echobuf.
(echo_char): Always store string in multibyte representation in
echobuf.
(echo_now): Call message2_nolog with the arg MULTIBYTE 1.
(read_key_sequence): Adjusted for the change of echo_prompt.
2000-12-14 10:44:56 +00:00
Gerd Moellmann
e10da50740 (do_mouse_tracking): Make externally visible. 2000-12-13 14:27:09 +00:00
Stefan Monnier
341a09cf9d (menu_bar_items, tool_bar_items):
Set `autoload' when looking up `tool-bar' or `menu-bar' submap.
2000-12-13 14:12:02 +00:00
Gerd Moellmann
52be17cc71 (record_char): Don't record identical help-echo
events in recent_keys.
2000-12-05 17:03:51 +00:00
Gerd Moellmann
ae18aa3b61 (Fread_key_sequence): Don't start the busy cursor
timer after having read a key.  It's not good for code reading
several keys in a loop, like an input method.
2000-12-04 14:48:32 +00:00
Gerd Moellmann
e8a5078504 (record_char): Record `help-echo' input events
in recent_keys only if they display some help.  Don't record
`help-echo' events as macro char.
2000-12-04 12:22:46 +00:00
Gerd Moellmann
902ae62032 (lucid_event_type_list_p): Handle `help-echo',
`vertical-line', `mode-line' and `header-line' events.
2000-11-27 14:43:30 +00:00
Jason Rumney
afabdbe599 (make_lispy_event) [mouse_wheel, drag_n_drop]: Args to
window_from_coordinates should be pixel coordinates.
2000-11-25 18:40:15 +00:00
Miles Bader
00392ce672 (Vminibuffer_message_timeout): New variable.
(command_loop_1): Use it to determine message timeout.
(syms_of_keyboard): Initialize it.
2000-11-22 01:34:53 +00:00
Gerd Moellmann
5ca020fca3 (show_help_echo): Call message3_nolog with number of
bytes in the help string as 2nd parameter, instead of the number
of characters.
2000-11-13 13:39:21 +00:00
Gerd Moellmann
5b7bc0da05 (read_char) <wrong_kboard>: Make sure that we
process idle timers while waiting for another event.
2000-10-31 16:31:04 +00:00
Gerd Moellmann
a1d34b1eee (syms_of_keyboard): Change DEFVAR_LISP of
update_menu_bindings to DEFVAR_BOOL.
2000-10-30 12:21:45 +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
Andrew Choi
1a578e9be2 Initial check-in: changes for building Emacs under Mac OS.
2000-10-23  Andrew Choi  <akochoi@i-cable.com>

	* dispextern.h [macintosh]: Include macgui.h instead of macterm.h.

	* dispnew.c [macintosh]: Include macterm.h.
	(init_display) [macintosh]: initialization for window system.

	* emacs.c (main) [macintosh]: Call syms_of_textprop,
	syms_of_macfns, syms_of_ccl, syms_of_fontset, syms_of_xterm,
	syms_of_search, x_term_init, and init_keyboard before calling
	init_window_once.  Also, call syms_of_xmenu.

	* fontset.c (syms_of_fontset) [macintosh]: Set ASCII font of
	default fontset to Monaco.

	* frame.c [macintosh]: Include macterm.h.  Remove declarations of
	NewMacWindow and DisposeMacWindow.
	(make_terminal_frame) [macintosh]: Call make_mac_terminal_frame
	instead of calling NewMacWindow and setting fields of
	f->output_data.mac directly.  Call init_frame_faces.
	(Fdelete_frame) [macintosh]: Remove unused code.
	(Fmodify_frame_parameters) [macintosh]: Call
	x_set_frame_parameters instead of mac_set_frame_parameters.

	* frame.h [macintosh]: Define menu_bar_lines field in struct
	frame.  Define FRAME_EXTERNAL_MENU_BAR macro.

	* keyboard.c [macintosh]: Include macterm.h.
	(kbd_buffer_get_event) [macintosh]: Generate delete_window_event
	and menu_bar_activate_event type events as for X and NT.
	(make_lispy_event) [macintosh]: Construct lisp events of type
	MENU_BAR_EVENT as for X and NT.

	* sysdep.c [macintosh]: Remove declaration for sys_signal.
	Include stdlib.h.  Remove definition of Vx_bitmap_file_path.
	(sys_subshell) [macintosh]: Remove definition entirely.
	(init_sys_modes) [macintosh]: Do not initialize Vwindow_system and
	Vwindow_system_version here.  Remove initialization of
	Vx_bitmap_file_path.
	(read_input_waiting): Correct the number of parameters passed to
	read_socket_hook.
	Move all Macintosh functions to mac/mac.c.

	* term.c [macintosh]: Include macterm.h.

	* window.c [macintosh]: Include macterm.h.

	* xdisp.c [macintosh]: Include macterm.h.  Declare
	set_frame_menubar and pending_menu_activation.
	(echo_area_display) [macintosh]: Do not return if terminal frame
	is the selected frame.
	(update_menu_bar) [macintosh]: Check FRAME_EXTERNAL_MENU_BAR (f).
	Allow only the selected frame to set menu bar.
	(redisplay_window) [macintosh]: Obtain menu bar to redisplay by
	calling FRAME_EXTERNAL_MENU_BAR (f).
	(display_menu_bar) [macintosh]: Check FRAME_MAC_P (f).

	* xfaces.c [macintosh]: Include macterm.h.  Define x_display_info
	and check_x.  Declare XCreateGC.  Define x_create_gc and
	x_free_gc.  Initialize font_sort_order.
	(x_face_list_fonts) [macintosh]: Use the same code as WINDOWSNT,
	but call x_list_fonts instead of w32_list_fonts.
	(Finternal_face_x_get_resource) [macintosh]: Do not call
	display_x_get_resource.
	(prepare_face_for_display) [macintosh]: Set xgcv.font.
	(realize_x_face) [macintosh]: Load the font if it is specified in
	ATTRS.
	(syms_of_xfaces) [macintosh]: Initialize Vscalable_fonts_allowed
	to Qt.

	* cus-edit.el (custom-button-face): Use 3D look for mac.
	(custom-button-pressed-face): Likewise.

	* faces.el (set-face-attributes-from-resources): Handle mac frames
	in the same way as x and w32 frames.
	(face-valid-attribute-values): Likewise.
	(read-face-attribute): Likewise.
	(defined-colors): Likewise.
	(color-defined-p): Likewise.
	(color-values): Likewise.
	(display-grayscale-p): Likewise.
	(face-set-after-frame-default): Likewise.
	(mode-line): Same default face as for x and w32.
	(tool-bar): Likewise.

	* frame.el: Remove call to frame-notice-user-settings at end of
	the file.

	* info.el (Info-fontify-node): make underlines invisible for mac
	as for x, pc, and w32 frame types.

	* term/mac-win.el: New file.
2000-10-22 16:50:16 +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
Gerd Moellmann
1db0076e78 (Frecursive_edit): Make sure redisplay can happen.
(show_help_echo): Use safe_call instead of
call_function; use safe_eval instead of eval_form.
2000-10-05 19:27:17 +00:00
Gerd Moellmann
3626fb1aea (update_menu_bindings): New variable.
(parse_menu_item): Use AREF.  If update_menu_bindings
is 0, don't update menu bindings.
(syms_of_keyboard): New Lisp variable `update-menu-bindings'.
2000-10-04 19:00:10 +00:00
Gerd Moellmann
25126faa09 (menu_bar_one_keymap): If KEYMAP is a symbol,
use its function definition.
(tool_bar_items): Likewise.
2000-09-29 12:42:01 +00:00
Gerd Moellmann
5295a50010 (show_help_echo): Set help_echo_showing_p.
(read_char): If help-echo is showing, preserve the echo area
when redisplaying.
2000-09-25 14:27:02 +00:00
Dave Love
9f83cf0bd0 (menu_bar_items, tool_bar_items)
(current_active_maps): Remove redundant get_local_map call.
2000-09-18 18:45:34 +00:00
Gerd Moellmann
8c907a5633 Avoid some more compiler warnings.
(parse_tool_bar_item): Ignore cached key bindings.
2000-09-13 11:18:03 +00:00
Kenichi Handa
7735786b8e (read_char_minibuf_menu_prompt): Call read_char with
the 4th arg (PREV_EVENT) Qt to suppress input method.
2000-08-28 01:32:15 +00:00
Stefan Monnier
9cd2ced769 (menu_bar_item): Detect duplicate entries for all items
to better match the key-lookup behavior.
2000-08-27 15:47:59 +00:00
Eli Zaretskii
f139e55913 Fix a typo in a comment. 2000-08-27 10:10:14 +00:00
Andrew Innes
026396097f Include keyboard.h before frame.h.
[USE_CRT_DLL]: Remove unnecessary extern, which
screws up dllimport attributes.
2000-08-22 22:23:58 +00:00
Gerd Moellmann
0bbfdc25a0 (gen_help_event): Add parameter SIZE.
(kbd_buffer_events_waiting): Slightly rewritten.
(clear_event): New function.
(kbd_buffer_get_event): Use it, and clear the input_events of
HELP_EVENTs.
(init_keyboard): Remove duplicate creation of kbd_buffer_gcpro and
don't fill the newly created array with nils.
(toplevel): Convert some old-style function forward declarations
to prototypes.
2000-08-21 18:59:19 +00:00
Gerd Moellmann
e4457b09c8 (kbd_buffer_get_event): Handle the case that the
second half of a HELP_EVENT is found at the start of kbd_buffer.
2000-08-18 03:13:27 +00:00
Kenichi Handa
a50e723f78 (make_lispy_event): Handle the new event type
multibyte_char_keystroke.
2000-08-11 00:50:51 +00:00