1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-29 00:31:01 -08:00
Commit graph

568 commits

Author SHA1 Message Date
Jim Blandy
e25c4e44b8 * keymap.c (initial_define_lispy_key): New function, for defining
non-ascii keys.

	* keymap.c (access_keymap): Treat bindings for Qt as default
	bindings, when new argument T_OK is non-zero.
	(get_keyelt, Fdefine_key, Flookup_key): Call access_keymap with
	T_OK false.
1992-10-11 06:43:30 +00:00
Jim Blandy
6084b314a5 * keyboard.h (Qswitch_frame): Declare this extern.
* keyboard.h (this_command_keys, this_command_key_count): Added
	external declarations.
1992-10-11 06:42:47 +00:00
Jim Blandy
cd21b83986 * keyboard.c (Vlast_event_frame): Make this variable exist even
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").
1992-10-11 06:42:03 +00:00
Jim Blandy
2f0b07e06c * frame.c: #include "commands.h" and "keyboard.h".
(Fselect_frame): Make this interactive, and accept
	switch-frame events as arguments, so we can bind this function to
	switch-frame events.
	(keys_of_frame): New function; bind switch-frame to Fselect_frame.
1992-10-11 06:40:57 +00:00
Jim Blandy
5e67fbc2f0 * emacs.c (main): Call keys_of_frame. 1992-10-11 06:40:24 +00:00
Jim Blandy
bc78232cf6 * callint.c (Fcall_interactively): Allow multiple 'e' specs.
(Finteractive): Doc fix.
1992-10-11 06:39:13 +00:00
Richard M. Stallman
c395cc7b23 [__GNUC__ >= 2] (LIB_STANDARD): Don't define. 1992-10-10 11:46:11 +00:00
Richard M. Stallman
3b7792ed33 (Fwrite_region): If VISIT is a file name,
use that as file name to visit, and print it in the message.
Use it for file locking too.
1992-10-10 08:34:51 +00:00
Richard M. Stallman
738949ec3a (PTY_ITERATION, etc.): Defined.
(FIRST_PTY_LETTER): Deleted.
1992-10-09 21:47:10 +00:00
Jim Blandy
0d73ca8156 * alloc.c (Fmemory_limit): Explain why we divide by 1024.
Don't bother trying to display the size in the minibuffer.
1992-10-07 20:42:40 +00:00
Jim Blandy
5bf3eac4a6 entered into RCS 1992-10-07 19:46:04 +00:00
Richard M. Stallman
72b2181785 (directory_file_name): Don't clobber the envvar
when handling top-level rooted dir.
1992-10-06 22:02:49 +00:00
Richard M. Stallman
ebdf55469b entered into RCS 1992-10-06 18:53:45 +00:00
Richard M. Stallman
19a36ec6dc (main) [NeXT]: Call malloc_jumpstart. 1992-10-06 05:09:37 +00:00
Richard M. Stallman
5743648e5f entered into RCS 1992-10-06 04:54:56 +00:00
Richard M. Stallman
172a9c1f72 (Fkill_buffer): Pass 2nd arg to Fother_buffer.
(Fswitch_to_buffer, Fpop_to_buffer, Fbury_buffer):
1992-10-06 00:03:29 +00:00
Richard M. Stallman
9262fcb66a (Fcall_interactively): Pass 2nd arg to Fother_buffer. 1992-10-06 00:03:11 +00:00
Richard M. Stallman
c3c734814d (make_frame): Pass 2nd arg to Fother_buffer. 1992-10-06 00:02:52 +00:00
Richard M. Stallman
faa64cf7ba (window_loop): Pass 2nd arg to Fother_buffer. 1992-10-06 00:02:06 +00:00
Joseph Arceneaux
b81450127d * config.h.in: Added a slot for definition of USE_TEXT_PROPERTIES,
controlling compilation of interval code.
	If using GNUC, support inline functions.
1992-10-05 19:03:02 +00:00
Richard M. Stallman
99e5add39c Doc fix. 1992-10-05 07:37:10 +00:00
Jim Blandy
0a7f1fc0b5 * keyboard.c (read_key_sequence): Treat mouse clicks on non-text
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".
1992-10-03 15:37:35 +00:00
Jim Blandy
20d2471455 * alloc.c (Fmemory_limit): New function.
(syms_of_alloc): Defsubr it.
1992-10-03 08:36:49 +00:00
Jim Blandy
ff06df24f6 * window.c (SAVE_WINDOW_DATA_SIZE): Define this using sizeof,
instead of just saying it's 7; that way, we won't get screwed if
	we add members to struct save_window_data.

	* window.c (Fset_window_configuration): The pointer to the
	saved window data is called `data', not just `d'.
1992-10-03 07:15:35 +00:00
Jim Blandy
bdc727bf41 * window.c (struct save_window_data): Save the currently selected
frame, too.
	(Fset_window_configuration): Restore the frame's selected window
	using Fselect_window, and then restore the selected frame using
	Fselect_frame.
	(Fcurrent_window_configuration): Record the currently selected
	frame.  Update docstring to describe the information now recorded.

	* window.c (Fset_window_configuration): Clean up the way we save
	and restore the frame's size.

        * window.c (struct save_window_data): Add a member called
	focus_frame, to save and restore the screen's focus frame.
	(Fset_window_configuration): Redirect the frame's focus as
	indicated in the window configuration.
	(Fcurrent_window_configuration): Record the frame's current focus.
1992-10-03 05:42:42 +00:00
Jim Blandy
f689eb05f4 * xterm.c (x_find_modifier_meanings): If there are no
modifiers containing a Meta_ keysym, use the Alt keysyms to
	denote meta.
	(construct_mouse_click): Set the down_modifier bit on mouse
	button press events.
	(XTread_socket): When processing keypress events, use
	x_meta_mod_mask when processing ordinary ASCII characters, not
	just when processing function keys and other non-ASCII events.
	(XTread_socket): If we receive a MappingNotify event with the
	`request' member set to `MappingModifier', then call
	x_find_modifier_meanings to refresh x_meta_mod_mask.
1992-10-03 05:10:14 +00:00
Jim Blandy
8058415c7a * process.c (wait_reading_process_input): If the select returns
ENOMEM, treat that like EINTR under Ultrix.
1992-10-03 03:30:53 +00:00
Jim Blandy
13b5e56c9b * keyboard.c (modify_event_symbol): Make sure that the unmodified
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.
1992-10-03 03:03:45 +00:00
Richard M. Stallman
f28f04cca2 (Fprimitive_undo): When undoing an insert, move point and then delete. 1992-10-03 02:12:40 +00:00
Jim Blandy
45288343f0 Doc fix. 1992-10-03 01:09:59 +00:00
Joseph Arceneaux
350273a493 Fixed typos. 1992-10-03 00:08:23 +00:00
Jim Blandy
91dc12bb84 * minibuf.c (read_minibuf): Don't bother to save the current
frame's focus, and have read_minibuf_unwind restore it; saving and
	restoring the window configurations will take care of that.
	(read_minibuf_unwind): Don't worry about restoring the frame's focus.
1992-10-03 00:06:36 +00:00
Joseph Arceneaux
7b1d5b85f8 * intervals.c: `copy_intervals()' no longer static. 1992-10-03 00:05:48 +00:00
Jim Blandy
cebd887d3a * keymap.c (access_keymap, store_in_keymap,
Fsingle_key_description): No need to check for
	EVENT_HAS_PARAMETERS before using EVENT_HEAD; the latter now
	works properly on all sorts of events.
1992-10-03 00:05:39 +00:00
Joseph Arceneaux
c1f6cc77a6 * intervals.h: Declare `copy_intervals()'. 1992-10-03 00:04:59 +00:00
Jim Blandy
53ce28d6e1 Doc fixes. 1992-10-03 00:04:45 +00:00
Jim Blandy
a1867fb159 * termhooks.h (struct input_event): Doc fix.
(NUM_MOUSE_BUTTONS): New constant.
	(click_modifier): New modifier.
	(NUM_MODIFIER_COMBOS): Removed.
1992-10-03 00:01:09 +00:00
Jim Blandy
ac501cd970 * keyboard.h (EVENT_HAS_PARAMETERS): Definition changed - all events
are not 5 elements long.
	(EVENT_HEAD): Work correctly on all sorts of events, not just
	events with parameters.
	(EVENT_WINDOW, EVENT_BUFFER_POSN, EVENT_SCROLLBAR_BUTTON,
	EVENT_WINDOW_POSN, EVENT_TIMESTAMP): These aren't useful
	anymore; this information may appear twice in an event.  These
	are replaced by the POSN_ accessors, which are meant to be
	composed with the EVENT_START and EVENT_END accessors.
	(EVENT_START, EVENT_END): Two new accessors, to get at the
	starting and ending position of an event.
	(POSN_WINDOW, POSN_BUFFER_POSN, PONS_SCROLLBAR_BUTTON,
	POSN_WINDOW_POSN, POSN_TIMESTAMP): New macros, to futher
	diasassemble the values returned by EVENT_START and EVENT_END.

	* keyboard.h (Qevent_unmodified): Extern declaration replaced by...
	(Qevent_symbol_elements): This.
	(EVENT_HEAD_UNMODIFIED): Use the Qevent_symbol_elements
	property, rather than the Qevent_unmodified property.
1992-10-02 23:56:44 +00:00
Jim Blandy
88cb06568f * keyboard.c (echo_char, read_char): Apply EVENT_HEAD without first
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.
1992-10-02 23:55:39 +00:00
Joseph Arceneaux
21cf4cf8a9 * buffer.c: #include intervals.h. 1992-10-02 23:43:16 +00:00
Joseph Arceneaux
249a6da954 Fixed typos. 1992-10-02 22:33:18 +00:00
Joseph Arceneaux
cde20f4168 * lisp.h: Declare Qbuffer_or_string_p. 1992-10-02 22:32:00 +00:00
Joseph Arceneaux
03ad6beb25 Fixed typeos. 1992-10-02 22:30:42 +00:00
Jim Blandy
031b0e3122 * xmenu.c: #include "keyboard.h".
(Fx_popup_menu): Use the event accessors defined in keyboard.h,
	instead of writing out cars and cdrs.
1992-10-02 22:18:46 +00:00
Joseph Arceneaux
db3563a8a2 * intervals.c: Removed #include of "screen.h". 1992-10-02 20:13:46 +00:00
Joseph Arceneaux
25013c264c * textprop.c: Conditionalize all functions on
"USE_TEXT_PROPERTIES".
1992-10-02 20:05:45 +00:00
Joseph Arceneaux
d2f7a8023e * intervals.c: Conditionalize all functions on
"USE_TEXT_PROPERTIES".
1992-10-02 20:02:51 +00:00
Joseph Arceneaux
d5e35230b5 * alloc.c: #include "intervals.h".
(init_intervals, make_interval,
	mark_interval, mark_interval_tree): New functions conditionally
	defined.
	(make_uninit_string): Call INITIALIZE_INTERVAL.
	(INIT_INTERVALS, UNMARK_BALANCE_INTERVALS, MARK_INTERVAL_TREE):
	New macros, conditionally defined.
	(mark_object): Call MARK_INTERVAL_TREE in case Lisp_String.
	(gc_sweep): If text properties are in use, place all unmarked
	intervals on the free list.  Call UNMARK_BALANCE_INTERVALS on
	`buffer->intervals' when unmarking `buffer'.
	(compact_strings): Include INTERVAL_PTR_SIZE in calculation for
	target of bcopy when relocating strings.
	(init_alloc_once): Call INIT_INTERVALS.
	(make_pure_string): Include INTERVAL_PTR_SIZE in calculation of
	`size'.
1992-10-02 19:59:42 +00:00
Joseph Arceneaux
8d4e077b70 * fileio.c (Finsert_file_contents): Call offset_intervals() if
text was actually inserted.
	#include "intervals.h".
1992-10-02 18:59:40 +00:00
Richard M. Stallman
c54ca9516b (mark_object): Avoid car recursion on cons with nil in cdr.
Avoid recursion on constants-vector of a compiled function.
1992-10-01 23:07:09 +00:00