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

531 commits

Author SHA1 Message Date
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
Joseph Arceneaux
07bd847225 Qbuffer_or_string_p added. 1992-10-01 01:58:57 +00:00
Joseph Arceneaux
410e16ff89 (describe_syntax): Use insert_char to insert `match'. 1992-10-01 01:52:09 +00:00
Joseph Arceneaux
33f7013e52 * buffer.c (reset_buffer): Do INITIALIZE_INTERVAL on the buffer's
interval component.
	(Fkill_buffer): Likewise.
1992-10-01 01:22:22 +00:00
Joseph Arceneaux
e221eae302 * lisp.h: Conditionally define interval structure and macros.
Add DECLARE_INTERVALS to struct Lisp_String.
1992-10-01 01:00:41 +00:00
Joseph Arceneaux
679194a6a0 * insdel.c: #include "intervals.h"
(prepare_to_modify_buffer): Call verify_interval_modification().
	(insert_from_string): Call offset_intervals() and
	graft_intervals_into_buffer().
	(del_range): Call offset_intervals().
	(insert): Call offset_intervals().
1992-10-01 00:56:11 +00:00
Joseph Arceneaux
d7e3e52b6e Various comment changes. 1992-10-01 00:56:11 +00:00
Joseph Arceneaux
e115a65b13 * intervals.h: Declare temp_set_point. 1992-10-01 00:56:11 +00:00
Joseph Arceneaux
1b92beaf6d * buffer.h: New macro TEMP_SET_PT. If intervals are used, SET_PT
and TEMP_SET_PT are function calls.
	Similarly for BUF_SET_PT and BUF_TEMP_SET_PT.
	Added DECLARE_INTERVALS to buffer structure to conditionally
	compile an interval tree into it..
1992-10-01 00:56:11 +00:00
Joseph Arceneaux
74d6d8c5d6 * editfns.c (make_buffer_string): Call copy_intervals_to_string().
(Finsert_buffer_substring): Call graft_intervals_into_buffer().
	#include "intervals.h".
1992-10-01 00:56:11 +00:00
Joseph Arceneaux
bef79ee47f *** empty log message *** 1992-10-01 00:56:11 +00:00
Joseph Arceneaux
cd7d971d06 Minor optimizations of Fset_text_properties and Ferase_text_properties. 1992-10-01 00:56:11 +00:00
Jim Blandy
a0ebb746f1 * buffer.c (Fother_buffer): Add back the VISIBLE_OK argument. It
got removed with no comment or ChangeLog entry, and
	append-to-buffer uses it.
1992-09-30 18:16:11 +00:00
Jim Blandy
e8121f2afa * window.c (Fset_window_configuration): Don't select the frame
just because we restored its configuration.

	* window.c (Fset_window_configuration): Don't forget to set the
	frame's selected window when we can't call Fselect_window.
1992-09-30 14:28:46 +00:00
Jim Blandy
28430d3c3b * xterm.c (x_meta_mod_mask): New variable, indicating which X
modifier bits denote meta keys.
	(x_find_modifier_meanings): New function, to set x_meta_mod_mask.
	(x_convert_modifiers): Use that.
	(x_term_init): Call x_find_modifier_meanings.

	* xterm.c (XTread_socket): Pass PropertyNotify events from the
	root window to x_invalidate_cut_buffer_cache.
	(x_term_init): Call x_watch_cut_buffer_cache here.
1992-09-30 11:57:51 +00:00
Jim Blandy
a5ca2b7540 * data.c (Fmake_local_variable): If SYM forwards to a C variable,
swap in the value for the current buffer immediately.
1992-09-30 11:35:45 +00:00
Jim Blandy
bad481d48f * lisp.h: Doc elaboration for Lisp_Buffer_Local_Value. 1992-09-30 11:29:49 +00:00
Joseph Arceneaux
7855e674d7 Mods to Ferase_text_properties 1992-09-30 01:11:20 +00:00
Jim Blandy
234a804bca * xselect.c (Qcut_buffer0): Symbol removed; we're using a new
interface to the cut buffer now.
	(NUM_CUT_BUFFERS, cut_buffer_atom, cut_buffer_value,
	cut_buffer_cached, cut_buffer_just_set): New variables.
	(Fx_own_selection, Fx_selection_value): Dike out the code to
	handle CUT_BUFFER0 requests.
	(Fx_get_cut_buffer, Fx_set_cut_buffer, x_watch_cut_buffer_cache,
	x_invalidate_cut_buffer_cache): New functions.
	(syms_of_xselect): Don't bother to initialize Qcut_buffer0.
	Initialize and staticpro cut_buffer_value, and defsubr
	Sx_get_cut_buffer and Sx_set_cut_buffer.
	* xterm.c (XTread_socket): Pass PropertyNotify events from the
	root window to x_invalidate_cut_buffer_cache.
	(x_term_init): Call x_watch_cut_buffer_cache here.
1992-09-29 18:30:35 +00:00
Jim Blandy
20218e2f8a * keymap.c (access_keymap): Don't forget to QUIT while scanning
the keymap.
1992-09-29 16:01:03 +00:00
Jim Blandy
533984a8ec * data.c (swap_in_symval_forwarding): Formatting tweaked. 1992-09-29 15:06:46 +00:00
Jim Blandy
9deb415abc * keyboard.c: Initialize recent_keys in syms_of_keyboard, not
init_keyboard; the latter is run after dumping, so you can't
	add more staticpros.
1992-09-29 14:29:22 +00:00
Jim Blandy
5160df46a2 * keyboard.c (recent_keys): Turn this from an array, which is a
pain in the neck to staticpro, into a vector, which is easier.
	(read_char, Frecent_keys): Access recent_keys as a lisp vector,
	not a C array.
	(init_keyboard): Set recent_keys to be a vector, and staticpro
	it.
1992-09-29 13:44:55 +00:00
Jim Blandy
629a12cfef * frame.c (Fdelete_frame): Call Fselect_frame with the appropriate
number of arguments.
1992-09-29 13:25:14 +00:00
Jim Blandy
bbe42033d2 * xterm.h (ROOT_WINDOW): Use the DefaultScreen macro, not the
XDefaultScreen function.
1992-09-29 11:32:13 +00:00
Jim Blandy
0e2c9c702c * editfns.c (save_excursion_save, save_excursion_restore):
Formatting tweaked for readability.
1992-09-29 06:19:35 +00:00
Jim Blandy
a080486e57 * data.c (Frem): Use the `fmod' function under SunOS, Ultrix, and
HP/UX, not just under USG systems.
1992-09-29 04:54:28 +00:00
Jim Blandy
b271272a9a * buffer.c (Fbury_buffer): This used to undisplay the buffer being
buried only if the BUFFER argument was nil.  Instead, undisplay the
	buffer whenever it's displayed in the selected window, no matter
	how it was specified by BUFFER.  This is how it behaves in 18.58,
	and I can't find any ChangeLog entry in 18.58 or 19.0 saying why
	they differ.  Fix the doc string accordingly.
1992-09-29 04:08:04 +00:00
Jim Blandy
8693ca83b8 * frame.c (Fselect_frame, Fframe_root_window,
Fframe_selected_window, Fnext_frame, Fmake_frame_visible,
	Fmake_frame_invisible, Ficonify_frame): Doc fixes.
1992-09-29 03:38:03 +00:00
Jim Blandy
98b7fe026f * ralloc.c: Since the users of the relocating allocation code
handle memory exhaustion, it's better to return an error code to
	them than to call abort.
	(obtain): If we cannot allocate more memory, don't call
	abort.  Instead, return non-zero iff the allocation is successful.
	(get_more_space): If obtain fails, return zero.
	(get_bloc): Return zero if we can't allocate the new bloc.
	(r_alloc_sbrk): Return zero if we can't allocate more memory.
	(r_alloc): If we can't allocate more memory, set *PTR to zero and
	return zero.
	(r_re_alloc): If we can't allocate more memory, leave *PTR
	unchanged, and return zero.

	* ralloc.c (warnfunction): Renamed to warn_function; users changed.
1992-09-29 01:08:33 +00:00
Richard M. Stallman
350bce561c (record_delete): Record pos before the deletion.
(Fprimitive_undo): Go back to recorded position.
1992-09-28 13:10:43 +00:00
Richard M. Stallman
be09561e2a (del_range): Call record_delete before updating point. 1992-09-28 13:10:15 +00:00
Richard M. Stallman
7d8451f188 (Finsert_file_contents): Do record_insert, then inc MODIFF. 1992-09-28 07:40:46 +00:00
Jim Blandy
fce33686a6 * keyboard.c (read_char): If we're returning an event from a
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.
1992-09-28 06:55:54 +00:00
Jim Blandy
21cec0712a * termhooks.h (alt_modifier, hyper_modifier, super_modifier,
down_modifier, drag_modifier): New modifiers, to support the new
	input system.  Re-arranged modifiers so that their bits are in
	canonical order; this makes reorder_modifiers slightly simpler.
1992-09-28 06:53:29 +00:00
Jim Blandy
9ace597fcf * window.c (delete_all_subwindows): Save the window's buffer in
its `height' field; we may need to know the window's old buffer
	once we have restored it from a window configuration.
	Fset_window_configuration): When we restore a window, if its
	`height' field is a buffer, restore its `buffer' field from that.
	This allows us to leave the window's buffer unchanged if the
	buffer recorded in the configuration is dead.

	* window.c (delete_all_subwindows): Removed unused variable named
	"count".
1992-09-28 06:10:03 +00:00
Jim Blandy
fde3a52f24 * keymap.c (access_keymap): Remove code to notice bindings for
Qt.

	* keymap.c (Fwhere_is_internal): Don't forget to advance map to
	the next element when we find something that is neither a vector
	nor a cons.  Don't forget to QUIT in the appropriate places,
	either.
1992-09-28 02:20:23 +00:00
Richard M. Stallman
ab6ee1a0bc (single_keymap_panes): Handle vectors properly. 1992-09-25 23:23:17 +00:00