1. 06 Dec, 1992 1 commit
  2. 16 Nov, 1992 1 commit
    • Jim Blandy's avatar
      * keyboard.c (unread_switch_frame): Don't declare this static. · 8f805655
      Jim Blandy authored
      	* keyboard.c (Vlast_event_frame): Doc fix.
      
      	* keyboard.c (read_char): Write composite events to the dribble
      	file properly.
      
      	* keyboard.c (init_keyboard): Initialize Vlast_event_frame to
      	Qnil, rather than the selected frame.
      
      	* keyboard.c (lispy_modifier_list): Added sanity check before
      	indexing into modifier_symbols.
      
      	* keyboard.c (add_command_key): When copying the contents of the
      	old this_command_keys to new_keys, remember to multiply size by
      	sizeof (Lisp_Object) to get the amount we really need to copy.
      
      	Rename unread_command_char to unread_command_event; it has
      	subtly different semantics now, and we should use
      	`make-obsolete-variable' to warn people.
      	* keyboard.c (unread_command_char): Rename.
      	(command_loop_1, read_char, Finput_pending, Fdiscard_input,
      	quit_throw_to_read_char, init_keyboard, syms_of_keyboard): Change
      	references.
      
      	* keyboard.c (read_key_sequence): Don't use
      	save_excursion_{save,restore} to protect the caller against buffer
      	switches; use Fset_buffer and Fcurrent_buffer; redisplay might
      	change point, and we don't want to undo that.
      
      	* keyboard.c (kbd_buffer_get_event): When checking a mouse
      	movement for a frame switch, don't assume Vlast_event_frame
      	contains a Lisp_Frame object.
      8f805655
  3. 07 Nov, 1992 1 commit
    • Jim Blandy's avatar
      * keyboard.c (read_key_sequence): Removed the · 07d2b8de
      Jim Blandy authored
      	replay_sequence_new_buffer label; replay_sequence should be here
      	instead.
      
      	* keyboard.c (Vlast_event_frame): Arrange for this to exist iff
      	MULTI_FRAME is defined.
      	[not MULTI_FRAME] (syms_of_keyboard): Don't DEFVAR Vlast_event_frame.
      	[not MULTI_FRAME] (read_char): Don't try to set Vlast_event_frame.
      	[not MULTI_FRAME] (kbd_buffer_store_event): Don't try to set
      	Vlast_event_frame for quit characters.
      	[not MULTI_FRAME] (kbd_buffer_get_event): Don't try to generate
      	switch-frame events.
      07d2b8de
  4. 31 Oct, 1992 1 commit
    • Jim Blandy's avatar
      * keyboard.c: #include dispextern.h. · f4255cd1
      Jim Blandy authored
      	(recursive_edit_unwind, command_loop, Fthis_command_keys): Declare
      	these to return Lisp_Objects at the very top of the file, to avoid
      	having them implicitly declared as ints.
      	(echo_char): Use EQ to compare C to help_char.
      	(read_char): Remember to apply XFASTINT to the return value of
      	Flength before using it.  Apply XINT to c when clearing its high
      	bits and meta bits, and when writing it to the dribble file.
      	(read_char_menu_prompt): Use EQ to compare obj with
      	menu_prompt_more_char and its control-character analog.
      	(read_key_sequence): Declare PROMPT to be char *, not a
      	Lisp_Object.  Use the appropriate accessors on keybuf when looking
      	for ASCII function key sequences.
      
      	* keyboard.c (echobuf): Make this 300 characters, not 100.  This
      	isn't a real fix, but it's quick.
      
      	* keyboard.c (read_char): When returning an unread switch-frame
      	event, jump to reread_first to return it, rather than reread; this
      	makes sure the event gets echoed (if appropriate) and goes into
      	this_command_keys.
      
      	* keyboard.c (read_key_sequence): If the key sequence starts with
      	a mouse click, read the key sequence using the keymaps of the
      	buffer clicked on, not the current buffer.
      
      	* keyboard.c (unread_switch_frame): Make this static, to indicate
      	that nobody outside of this file uses it.
      
      	* keyboard.c (follow_key): Ask get_keymap_1 to perform autoloads.
      	(read_key_sequence): When pursuing potential bindings in the
      	function key map, ask get_keymap_1 to perform autoloading.  This
      	is hardly important, but it's consistent.
      f4255cd1
  5. 20 Oct, 1992 1 commit
  6. 19 Oct, 1992 1 commit
    • Jim Blandy's avatar
      * keyboard.c (this_command_keys): Make this a vector, instead of · 6569cc8d
      Jim Blandy authored
      	an array of Lisp_Objects.
      	(this_command_keys_size): Deleted.
      	(echo, add_command_key, Fthis_command_keys): Adjusted
      	appropriately.
      	(init_keyboard): Don't allocate it here.
      	(syms_of_keyboard): Allocate it here, and staticpro it.
      
      	* keyboard.c (read_char): Call ourselves with the appropriate
      	number of arguments.
      	(read_char_menu_prompt): If USED_MOUSE_MENU is zero, don't try to
      	store things in it.
      
      	* keyboard.c (modify_event_symbol): Arrange to set the
      	click_modifier bit on otherwise unmodified mouse clicks.
      
      	* keyboard.c (kbd_buffer_get_event): Remember that
      	*mouse_position_hook may set *FRAME to 0; don't generate
      	switch-frame events in this case.  Fix fencepost bug in fetching
      	events from keyboard buffer.
      6569cc8d
  7. 12 Oct, 1992 2 commits
  8. 11 Oct, 1992 1 commit
    • Jim Blandy's avatar
      * keyboard.c (Vlast_event_frame): Make this variable exist even · cd21b839
      Jim Blandy authored
      	when MULTI_FRAME isn't #defined.  People might find it
      	necessary for writing correct programs, even when the programs
      	don't explicitly use multiple frames.
      	(read_char, kbd_buffer_store_event, kbd_buffer_get_event): No need
      	to test MULTI_FRAME before setting Vlast_event_frame.
      	(syms_of_keyboard): DEFVAR Vlast_event_frame whether or not
      	MULTI_FRAME is defined.
      
              * keyboard.c: Add switch-frame events.
      	(Qswitch_frame): New event header symbol.
      	(head_table): Include Qswitch_frame in the table of event heads.
      	(kbd_buffer_get_event): Detect when a frame switch has occurred,
      	and return a frame switch event before the enqueued event.
      	(make_lispy_switch_frame): New function.
      	(unread_switch_frame): New variable.
      	(read_key_sequence): Don't throw away the key sequence if the user
      	switches frames in the middle of the sequence.  Instead, when we
      	receive a switch-frame event in the middle of a key sequence, save
      	it, and stuff it into unread_switch_frame when the sequence
      	is complete.
      	(read_char): If unread_switch_frame is set, return that value.
      	(command_loop_1): No need to check Vlast_event_frame and select
      	new frames here; that's taken care of by switch-frame events now.
      	(syms_of_keyboard): Initialize and staticpro unread_switch_frame.
      
      	* keyboard.c (follow_key, read_key_sequence): Call access_keymap
      	with T_OK true.
      
      	* keyboard.c (apply_modifiers): Copy the value of BASE's
      	Qevent_kind property to the new symbol.
      
      	* keyboard.c (syms_of_keyboard): Qevent_kind should be initialized
      	to intern ("event-kind"), not intern ("event-type").
      cd21b839
  9. 03 Oct, 1992 2 commits
    • Jim Blandy's avatar
      * keyboard.c (read_key_sequence): Treat mouse clicks on non-text · 0a7f1fc0
      Jim Blandy authored
      	areas as if they were prefixed with the symbol denoting the
      	area clicked on - `mode-line', etcetera.
      	When we throw away an unbound `down-' event, reset mock_input as
      	well.
      
      	* keyboard.c (Qevent_symbol_element_mask, Qmodifier_cache): Two
      	new symbols, used to implement caches on event heads.  These take
      	the place of some of the caching that modify_event_symbol used to do.
      	(parse_modifiers_uncached, apply_modifiers_uncached,
      	lispy_modifier_list, parse_modifiers, apply_modifiers): New
      	functions, which replace format_modifiers and reorder_modifiers;
      	they can be useful elsewhere too.
      	(reorder_modifiers, modify_event_symbol): Re-implement these in
      	terms of parse_modifiers and apply_modifiers.  modify_event_symbol
      	now uses a much simpler cache, and takes advantage of the caches
      	maintained by parse_ and apply_modifiers.
      	(follow_key): Don't modify NEXT if KEY has no bindings.
      	(read_key_sequence): Drop unbound `down-' events, and turn unbound
      	`drag-' events into clicks if that would make them bound.  This
      	benefits from the rewriting of the modifier key handling code.
      	(syms_of_keyboard): Initialize and intern
      	Qevent_symbol_element_mask and Qmodifier_cache.
      
      	* keyboard.c (echo_prompt): Terminate the echo buffer properly
      	even when the string is too long to display in the minibuffer.
      	(echo_truncate): Just return echoptr - echobuf, rather than
      	calling strlen on echobuf.
      
      	* keyboard.c (modifier_names): The modifier is named "control",
      	not "ctrl".
      0a7f1fc0
    • Jim Blandy's avatar
      * keyboard.c (modify_event_symbol): Make sure that the unmodified · 13b5e56c
      Jim Blandy authored
      	event header gets the proper properties set on it, by recursing
      	and letting the same code build the properties for all event symbols.
      
      	* keyboard.c (Qmouse_click): Fix typo which assigned `mouse-click'
      	symbol to Qmouse_movement.
      13b5e56c
  10. 02 Oct, 1992 1 commit
    • Jim Blandy's avatar
      * keyboard.c (echo_char, read_char): Apply EVENT_HEAD without first · 88cb0656
      Jim Blandy authored
      	testing for EVENT_HAS_PARAMETERS; EVENT_HEAD works properly on
      	all sorts of events now.
      	(read_key_sequence): Use the new accessors to decide in which window
      	an event occurred.
      
      	* keyboard.c (Qevent_unmodified): Replaced by...
      	(Qevent_symbol_elements): New property.
      	(syms_of_keyboard): initialize and staticpro the latter, not the
      	former.
      
      	* keyboard.c (readable_events): This doesn't need to scan and
      	discard mouse release events anymore; it just uses
      	EVENT_QUEUES_EMPTY.
      	(kbd_buffer_get_event): No need to skip past mouse release events.
      
      	* keyboard.c (button_down_location): New variable, which
      	stores the location at which each button was pressed, so we
      	can build a complete drag event when the button is released.
      	(make_lispy_event): When a button is pressed, record its
      	location in button_down_location, and turn it into a `down'
      	event.  When a button is released, compare its release
      	location with its press location, and decide whether to call
      	it a `click' or `drag' event.
      	Change mouse movement events to be arranged like click events.
      	(format_modifiers): Note that the click modifier has no
      	written representation.
      	(modifier_names, modifer_symbols): New variables, used to
      	create the Qevent_symbol_elements property.
      	(modify_event_symbol): Change the format of the modified
      	symbol cache; there are too many modifier bits now to use a
      	vector indexed by a modifier mask.  Use an assoc-list instead.
      	Document the format of the cache.
      	Put the Qevent_symbol_elements property on each new symbol,
      	instead of a Qevent_unmodified property.
      	(symbols_of_keyboard): Put Qevent_symbol_elements properties on
      	the symbols specified in head_table, not Qevent_unmodifed properties.
      	Initialize and staticpro modifier_symbols, and staticpro the
      	window elements of button_down_location.
      88cb0656
  11. 29 Sep, 1992 2 commits
  12. 28 Sep, 1992 1 commit
    • Jim Blandy's avatar
      * keyboard.c (read_char): If we're returning an event from a · fce33686
      Jim Blandy authored
      	macro, set Vlast_event_frame to Qmacro, instead of leaving it set
      	to the frame of the previous real event.
      	(read_key_sequence): If Vlast_event_frame isn't a frame, don't
      	bother switching buffers.
      	(syms_of_keyboard): Doc fix for Vlast_event_frame.
      	(Vlast_event_frame): Doc fix.
      
      	* keyboard.c (format_modifiers, reorder_modifiers): Handle the new
      	modifier bits.
      fce33686
  13. 14 Sep, 1992 1 commit
  14. 13 Sep, 1992 1 commit
    • Jim Blandy's avatar
      * keyboard.c (kbd_buffer_get_event): When performing the · 2ce30ea2
      Jim Blandy authored
      	FRAME_FOCUS_FRAME redirection, don't modify the frame field of
      	the event; that fatally corrupts mouse click events.  Instead,
      	just perform the redirection on the value assigned to
      	Vlast_event_frame.
      
      	* keyboard.c (input_available_signal): Declare this to return
      	SIGTYPE.
      2ce30ea2
  15. 12 Sep, 1992 1 commit
  16. 11 Sep, 1992 1 commit
  17. 05 Sep, 1992 1 commit
    • Richard M. Stallman's avatar
      (last_nonmenu_event): New var. · 7d6de002
      Richard M. Stallman authored
      (syms_of_keyboard): New Lisp var.
      (read_key_sequence): Use that instead of prev_event.
      
      (read_char): Call read_char_menu_prompt here.
      Accept 4 new args to pass to it.  Include them in recursive call.
      Don't delay before starting echo if prev_event was a mouse event.
      Test for eof in batch mode now understands C is a Lisp_Object.
      (read_key_sequence): Don't call it here; always call read_char.
      Don't change last_event_buffer after a mouse menu input.
      (read_char_menu_prompt): Arg PROMPT deleted.
      Return nil if nothing to do.
      
      (read_key_sequence): Keep track of prev_event.
      Pass new proper args to read_char_menu_prompt.
      (read_char_menu_prompt): New arg prev_event.  Use Fx_popup_menu.
      Handle any number of keymaps, not just LOCAL and GLOBAL.
      Invert meaning of arg PROMPT.  Test of menu_prompting was backwards.
      
      (keymap_table): No longer static.
      7d6de002
  18. 29 Aug, 1992 1 commit
  19. 19 Aug, 1992 1 commit
    • Jim Blandy's avatar
      * keyboard.c (init_keyboard): Changed "#endif SIGIO" to · 8ea0a720
      Jim Blandy authored
      	"#endif /* SIGIO */"
      
      	* keyboard.c (Fexecute_mouse_event): dyked-out function deleted.
      	We're not going to use this mouse interface.
      	(Vmouse_window, Vmouse_event, Vmouse_event_function,
      	Vmouse_left_hook, Vmap_frame_hook, Vunmap_frame_hook,
      	Vmouse_motion_handler): Variables deleted; they were to be used by
      	Fexecute_mouse_event.
      	(syms_of_keyboard): Same.
      	(command_loop_1): Remove dyked-out code to support
      	Fexecute_mouse_event.
      	(read_char): Same.
      
      	* keyboard.c (Vlast_event_frame): Don't define this window if
      	MULTI_FRAME is not #defined.
      	(syms_of_keyboard): Same.
      	(kbd_buffer_store_event): Don't try to work with Vlast_event_frame
      	if MULTI_FRAME is not #defined.
      	(kbd_buffer_get_event): Same.
      
      	* keyboard.c (Fdiscard_input): Removed dyked-out code from when
      	unread_command_char's quiescent value was -1, not nil.
      8ea0a720
  20. 14 Aug, 1992 1 commit
    • Jim Blandy's avatar
      * keyboard.c (Fexecute_mouse_event): dyked-out function deleted. · 3e51c7b7
      Jim Blandy authored
      	We're not going to use this mouse interface.
      	(Vmouse_window, Vmouse_event, Vmouse_event_function,
      	Vmouse_left_hook, Vmap_frame_hook, Vunmap_frame_hook,
      	Vmouse_motion_handler): Variables deleted; they were to be used by
      	Fexecute_mouse_event.
      	(syms_of_keyboard): Same.
      	(command_loop_1): Remove dyked-out code to support
      	Fexecute_mouse_event.
      	(read_char): Same.
      
      	* keyboard.c (Vlast_event_frame): Don't define this window if
      	MULTI_FRAME is not #defined.
      	(syms_of_keyboard): Same.
      	(kbd_buffer_store_event): Don't try to work with Vlast_event_frame
      	if MULTI_FRAME is not #defined.
      	(kbd_buffer_get_event): Same.
      
      	* keyboard.c (Fdiscard_input): Removed dyked-out code from when
      	unread_command_char's quiescent value was -1, not nil.
      3e51c7b7
  21. 12 Aug, 1992 1 commit
    • Jim Blandy's avatar
      * keyboard.c (Fsuspend_emacs): Call change_frame_size with the · d5045cf9
      Jim Blandy authored
      	proper arguments - the height and width are the second and third
      	arguments, not the first and second.  Pass 0 for DELAY.
      
      	* keyboard.c (FRAME_IS_TERMCAP, FRAME_IS_X,
      	FRAME_HAS_MINIBUF): Renamed these to FRAME_TERMCAP_P,
      	FRAME_X_P, and FRAME_HAS_MINIBUF_P, for consistency with the
      	rest of the frame macros.
      d5045cf9
  22. 05 Aug, 1992 1 commit
  23. 30 Jul, 1992 1 commit
  24. 22 Jul, 1992 1 commit
  25. 13 Jul, 1992 1 commit
  26. 30 Jun, 1992 1 commit
  27. 24 Jun, 1992 1 commit
  28. 23 Jun, 1992 1 commit
  29. 10 Jun, 1992 1 commit
  30. 09 Jun, 1992 1 commit
  31. 07 Jun, 1992 1 commit
  32. 05 Jun, 1992 1 commit
  33. 04 Jun, 1992 2 commits
  34. 19 May, 1992 1 commit
  35. 18 May, 1992 1 commit
  36. 10 May, 1992 1 commit