1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 11:50:51 -08:00
Commit graph

1803 commits

Author SHA1 Message Date
Jim Blandy
6817eab405 * xfns.c (Fx_create_frame): Block input around call to
x_new_font.  Test if the return value is a string, not if it's
	nil; x_new_font can return things besides nil and strings, to
	indicate error conditions.
1993-07-18 08:07:18 +00:00
Jim Blandy
041b69acff * xterm.c (x_term_init): Adjust message printed when we can't
connect to the X server.

	* xterm.c (XTread_socket, UnmapNotify case): Add missing comment
	terminator.

	* xterm.c, sysdep.c (F_SETOWN_BUG): Defined.
	* m/dpx2.h: New file.
1993-07-18 06:29:55 +00:00
Jim Blandy
d387c9605b * xfns.c (Fx_open_connection): Don't trust HAVE_XRMSETDATABASE;
use XrmSetDatabase only when HAVE_X11R5 is defined.

	* xfns.c (Vx_resource_name): Renamed from Vxrdb_name, and made a
	lisp-visible variable, so lisp/term/x-win.el can set it.  Doc it
	for "internal use only"; no need for NEWS entry.
	(validate_x_resource_name): New function.
	(Fx_get_resource): Doc fix.  References to Vxrdb_name renamed.  Call
	validate_x_resource_name.
	(x_window): References to Vxrdb_name renamed.  Call
	validate_x_resource_name.
	(Fx_open_connection): References to Vxrdb_name renamed.  Instead
	of setting and validating its value here, just call
	validate_x_resource_name.
	(syms_of_xfns): Add DEFVAR_LISP for Vx_resource_name.

	* xfns.c (x_set_frame_parameters): Don't set the frame's size and
	position unless those parameters are actually specified in ALIST.

	* xrdb.c: Implement search for app-defaults directory and
	localized default databases, along with some other functionality
	provided by Xt.
	#include <stdio.h>, since we call sprintf.
	[emacs] (malloc, realloc, free): #define these to xmalloc,
	xrealloc, and xfree.
	(x_get_string_resource, file_p): Add forward declarations for
	these.
	(x_customization_string): New variable.
	(x_get_customization_string): New function.
	(gethomedir): Return malloc'ed space of the right size, instead of
	writing into a fixed-size buffer; this means that our callers do
	not impose an arbitrary limit on file name length.
	(magic_file_p): Rewrite of decode_magic; actually do the
	substitutions, instead of expanding all %-escapes to "".  Support
	the customization string.  Return 0 or the expanded file name,
	instead of just zero or one.  Allocate the space for the expanded
	file name ourselves, instead of writing into a fixed-size buffer
	passed to us; this removes an arbitrary limit.
	(search_magic_path): Rewrite of magic_searchpath_decoder.  Return
	0 or the expanded file name, instead of just zero or one.
	Allocate the space for the expanded file name ourselves, instead
	of writing into a fixed-size buffer passed to us; this means that
	our callers do not impose an arbitrary limit on file name length.
	(get_system_app): Changed to work with search_magic_path.
	(get_user_app): Rewritten to work with search_magic_path, and not
	to assume that the values of XAPPLRESDIR is a single directory.
	(get_user_db): Properly use the new version of gethomedir.
	(get_environ_db): Remove arbitrary limit on length of host name.
	(x_load_resources): Take a new argument, myname.  Call get_user_db
	early to obtain the customization string.
	Changes to stand-alone testing code.
	* xfns.c (Fx_open_connection): Set Vxrdb_name early, and pass it
	to x_load_resources.
1993-07-18 06:29:19 +00:00
Jim Blandy
26f6279de1 * window.c [not MULTI_FRAME] (Fdelete_windows_on): Set FRAME
argument to Qt, instead of trying to typecheck it.

	* window.c (Fdelete_windows_on): New optional argument FRAME; if
	nil, delete windows on all frames.  If t, delete windows on the
	selected frame only.  If a frame, delete windows on that frame
	only.

	* window.c (Fnext_window, Fprevious_window): Put these docstrings
	in comments; the strings are too long for some C compilers.
1993-07-18 06:28:40 +00:00
Jim Blandy
ad9c19400f * intervals.c (split_interval_left, split_interval_right): Change
OFFSET argument of these functions to be origin 0, not origin 1.
	This is what all the callers currently want.
	* intervals.c, textprop.c: All callers changed.

	* textprop.c (Ftext_property_not_all): Renamed from
	Ftext_property_all, and changed sense of return value, so that it
	returns useful information if not all characters have properties
	EQ to value.  Now all the existential and universal questions can
	be asked.

	* textprop.c (syms_of_textprop): Don't forget defsubr for
	Stext_property_all.

	* textprop.c (Ftext_property_any, Ftext_property_all): Use EQ to
	compare property values, not Fequal.

	* textprop.c (Ftext_property_any, Ftext_property_all): New
	functions, from David Gillespie.
	* intervals.h (Ftext_property_any, Ftext_property_all): Declare them.
1993-07-18 06:28:12 +00:00
Jim Blandy
23c6349cdd * termhooks.h: In order to avoid declaring struct input_event
(which contains Lisp_Objects) in those .c files which need access
	to the terminal hooks but don't #include lisp.h (like cm.c), test
	to see if the macro CONSP is #defined.  We used to test XINT, but
	config.h will #define that everywhere on systems that use tailored
	tagging schemes.
1993-07-18 06:27:38 +00:00
Jim Blandy
46f2fdac02 * xterm.c, sysdep.c (F_SETOWN_BUG): Defined.
* m/dpx2.h: New file.
1993-07-18 06:27:15 +00:00
Jim Blandy
2fcea188d6 * syntax.c (Fmodify_syntax_entry): Doc fix. 1993-07-18 06:26:51 +00:00
Jim Blandy
c7b1427704 * print.c (float_to_string): Distinguish between a precision of
zero and an omitted precision.  Do allow %.0f to produce strings
	containing no decimal point or exponent.
	(syms_of_print): Doc fix for float-output-format.
1993-07-18 06:26:28 +00:00
Jim Blandy
e872064401 Consistently use the mark bit of the root interval's parent field
to say whether or not the interval tree has been visited (and skip
	it when revisited), and the mark bit of the plist field to say
	whether or not that interval has been visited (and abort if
	revisited); don't try to use the plist mark bit for both
	meanings.
	* alloc.c (mark_interval_tree): Don't test if the interval tree
	has already been visited here; let the MARK_INTERVAL_TREE macro do
	that; avoid function call overhead.  Mark the interval tree as
	having been visited by setting TREE->parent's mark bit.
	(MARK_INTERVAL_TREE): If the tree has been visited (according to
	I->parent's mark bit), don't call mark_interval_tree.
	(gc_sweep): Rebalance the interval trees of those large strings
	which are still alive.  This also clears the mark bits of those
	trees' root intervals' parent fields.
	(compact_strings): Rebalance the interval tree of each small
	strings which is still alive.  This also clears the mark bits of
	that tree's root interval's parent field.  Since the string has
	moved, update the root interval's parent pointer to contain the
	new address.
	* lisp.h (struct interval): Doc fix; explain the roles of the mark
	bits of the parent and plist members.
1993-07-18 06:26:10 +00:00
Jim Blandy
718ca51e40 * keyboard.c (read_key_sequence): Accept both strings and vectors
as bindings in function-key-map.
    	* keymap.c (Vfunction_key_map in syms_of_keymap): Doc fix.

	* keymap.c (syms_of_keymap): Doc fix.
1993-07-18 06:25:40 +00:00
Jim Blandy
f5ea616372 * keyboard.c (read_key_sequence): Accept both strings and vectors
as bindings in function-key-map.
    	* keymap.c (Vfunction_key_map in syms_of_keymap): Doc fix.

	* keyboard.c (Fsuspend_emacs): Pass selected_frame as the first
	argument to change_frame_size, not 0.  This function may be called
	in an Emacs compiled with multi-frame support.
1993-07-18 06:25:09 +00:00
Jim Blandy
5256403ca5 * textprop.c (Ftext_property_any, Ftext_property_all): New
functions, from David Gillespie.
	* intervals.h (Ftext_property_any, Ftext_property_all): Declare them.
1993-07-18 06:24:48 +00:00
Jim Blandy
2bc7a79bdc * intervals.c (split_interval_left, split_interval_right): Change
OFFSET argument of these functions to be origin 0, not origin 1.
	This is what all the callers currently want.
	* intervals.c, textprop.c: All callers changed.

	* intervals.c (graft_intervals_into_buffer): Properly compute
	length of buffer.
1993-07-18 06:24:25 +00:00
Jim Blandy
c02e300467 * dispnew.c (direct_output_for_insert): By the time this function
is called, we have already inserted the character into the buffer;
	the proper buffer position to pass to compute_char_face is point
	- 1, not point.
1993-07-18 06:23:32 +00:00
Jim Blandy
331636c44e * Makefile.in (C_SWITCH_SYSTEM): New variable, set by top-level
Makefile.
	(xmakefile): Pass it to the C preprocessor.
1993-07-18 06:22:37 +00:00
Richard M. Stallman
9f9c0e277f (Vhelp_menu_bar_map): Deleted.
(menu_bar_items): Move elts for events in Vmenu_bar_final_items to end.
(syms_of_keyboard): Corresponding changes.
1993-07-17 02:10:03 +00:00
Richard M. Stallman
dcc408a053 (read_char_menu_prompt): If the user rejects a menu,
return t.  This makes read_char also return t.
(read_key_sequence): If read_char returned t, return -1.
(Fread_key_sequence): If read_key_sequence returned -1, quit.
(command_loop_1): If read_key_sequence returned -1, loop around.
1993-07-15 06:56:17 +00:00
Richard M. Stallman
cfc736bf9a (Fdisplay_completion_list): Run completion-setup-hook. 1993-07-15 05:46:02 +00:00
Richard M. Stallman
553defa404 (Fbuffer_local_variables): For local var that is unbound,
put just the symbol in the result, not a cons of (symbol . value).
1993-07-15 05:36:59 +00:00
Jim Blandy
ae450a9555 * keyboard.c (menu_bar_one_keymap): If the key's binding is the
symbol `undefined', don't try to take that symbol's cdr before
passing it to menu_bar_item; pass the `undefined' binding itself,
so menu_bar_item can remove bindings for the same key from result.
1993-07-15 04:58:59 +00:00
Richard M. Stallman
2e894dab2b (Qdisabled_command_hook): New variable.
(Vdisabled_command_hook): Deleted.
(syms_of_keyboard): Corresponding changes.
(Fcommand_execute): Use Qdisabled_command_hook.
1993-07-15 03:09:56 +00:00
Richard M. Stallman
a73c5e2988 (Vhelp_menu_bar_map): New var.
(syms_of_keyboard): Set up Lisp var for it.
(menu_bar_items): Use Vhelp_menu_bar_map.
1993-07-14 16:49:30 +00:00
Richard M. Stallman
12ae29ebfb (mark_object) [DEBUG_MOLE]: Add abort at beginning. 1993-07-14 16:36:25 +00:00
Jim Blandy
bb5fa23256 Initial revision 1993-07-14 06:09:19 +00:00
Richard M. Stallman
f1ca901238 (verify_interval_modification): Use Qinsert_in_front_hooks and
Qinsert_behind_hooks instead of previous names.
1993-07-13 21:08:45 +00:00
Richard M. Stallman
c2d8811cc6 (Qinsert_in_front_hooks, Qinsert_behind_hooks): Declared.
This replaces part of previous change.
1993-07-13 21:07:02 +00:00
Richard M. Stallman
f256353cbc (prepare_to_modify_buffer): Call verify_overlay_modification. 1993-07-13 21:06:19 +00:00
Richard M. Stallman
173f2a642c (verify_overlay_modification): New function.
(call_overlay_mod_hooks): New function.
1993-07-13 21:05:26 +00:00
Richard M. Stallman
f7a9275a0e (Qinsert_in_front_hooks, Qinsert_behind_hooks): New vars.
(syms_of_textprop): Set them up.

(set_properties): Call modify_region.
(remove_properties): Call modify_region before record_property_change.
(add_properties): Likewise.
1993-07-13 21:04:07 +00:00
Jim Meyering
e1efaae9a2 *** empty log message *** 1993-07-13 16:37:01 +00:00
Richard M. Stallman
8537f1cb3a (Qinsert_before_hooks, Qinsert_after_hooks): Declared.
(Qmodification_hooks): Declared.
1993-07-13 02:20:40 +00:00
Richard M. Stallman
c36494197b (verify_interval_modification):
For insertion, run the insert-before-hooks and insert-after-hooks,
not the modification-hooks.
1993-07-13 02:19:50 +00:00
Richard M. Stallman
e58aa38535 (Qundefined): New variable.
(syms_of_keyboard): Set up Qundefined.
(menu_bar_items): Don't reverse the items.
Process the maps in reverse order.
(menu_bar_item): If definition is `undefined',
delete any menu bar item already made, and don't make one.
1993-07-12 23:32:43 +00:00
David J. MacKenzie
039e9c8b9b *** empty log message *** 1993-07-12 22:13:12 +00:00
Richard M. Stallman
97f3b3d6e9 (wait_reading_process_input): If wait_for_cell, do call
swallow_events and do_pending_window_change when appropriate.
1993-07-09 21:42:51 +00:00
Roland McGrath
646d9d18cc (region_limit): Declare Vmark_even_if_inactive. 1993-07-08 23:45:22 +00:00
Roland McGrath
2ad6c95919 (syms_of_callint): Fix DEFVAR_LISP for Vmark_even_if_inactive to use right
Lisp symbol name (without V prepended).
1993-07-08 23:44:01 +00:00
Roland McGrath
6497d2d838 (check_mark): Don't check mark-active unless in transient-mark-mode.
For inactive mark, signal mark-inactive instead of error with a message.
1993-07-08 21:43:11 +00:00
Roland McGrath
c9dd14e184 (region_limit): Don't error if Vmark_even_if_inactive is set. When the
mark is inactive and that is a no-no, signal mark-inactive instead of using
error with a message.
1993-07-08 21:36:04 +00:00
Roland McGrath
638b77e614 (syms_of_data): Staticpro Qmark_inactive. 1993-07-08 21:27:33 +00:00
Roland McGrath
3b8819d645 Define Qmark_inactive.
(syms_of_data): Initialize it.
1993-07-08 21:26:57 +00:00
Roland McGrath
83125cd707 Declare Qmark_inactive. 1993-07-08 21:26:29 +00:00
Richard M. Stallman
07f15dfd8b (describe_map_tree): When inserting TITLE, mention PREFIX.
Insert newline at end, if inserted anything else.
(describe_buffer_bindings): Corresponding changes.
For minor mode maps, build up a title string,
then let describe_map_tree insert it.
1993-07-07 18:40:35 +00:00
Jim Blandy
50aa2f9032 * editfns.c (Fformat): Since floats occupy two elements in the
argument list passed to doprnt, we must use separate indices for
	the array of arguments passed to Fformat, and the array of
	arguments to be passed to doprnt.
1993-07-07 10:22:05 +00:00
David J. MacKenzie
fb3ebe6ca6 *** empty log message *** 1993-07-06 23:07:30 +00:00
Jim Blandy
15e4954b14 * textprop.c (copy_text_properties): Pass a copy of POS to
validate_interval_range; that function increments its arguments,
	which isn't what we want.

	* intervals.c (find_interval): Consistently treat POSITION as an
	actual buffer position, i.e. origin 1.  The old code seemed
	undecided on this point.  Treat the end of the buffer as being
	part of the rightmost interval.
	(adjust_intervals_for_insertion): Consistently treat POSITION as
	origin 1.
	(interval_deletion_adjustment): The exception: FROM should be
	origin zero here.  Consistently treat it as such.  Simplify code
	which shrinks and possibly deletes intervals.
	(adjust_intervals_for_deletion): Treat start as origin 1; our
	caller does.
	(set_point): Use buffer positions throughout, not a mix of buffer
	posns and origin zero posns.
	(get_local_map): Remove special case for POSITION at end of buffer;
	find_interval handles that case correctly.
	(verify_interval_modification): Remove special case for START at
	end of buffer.
	* textprop.c (validate_interval_range): End-of-buffer/string
	positions no longer need special handling.

	* textprop.c (copy_text_properties): New function, from David
	Gillespie.
	* intervals.h: Declare copy_text_properties.
	* fns.c: #include "intervals.h".
	(Fsubstring): Copy text properties to result string.
	(concat): Copy text properties to result string.
	* ymakefile (fns.o): Note that this depends on INTERVAL_SRC.
1993-07-06 14:55:20 +00:00
Jim Blandy
15e92abada * textprop.c (copy_text_properties): New function, from David
Gillespie.
	* intervals.h: Declare copy_text_properties.
	* fns.c: #include "intervals.h".
	(Fsubstring): Copy text properties to result string.
	(concat): Copy text properties to result string.
	* ymakefile (fns.o): Note that this depends on INTERVAL_SRC.
1993-07-06 14:54:28 +00:00
Jim Blandy
24e3d3bf9e * intervals.c (find_interval): Doc fixes, computation of
tree->position rearranged for clarity.

	* intervals.c (find_interval): Consistently treat POSITION as an
	actual buffer position, i.e. origin 1.  The old code seemed
	undecided on this point.  Treat the end of the buffer as being
	part of the rightmost interval.
	(adjust_intervals_for_insertion): Consistently treat POSITION as
	origin 1.
	(interval_deletion_adjustment): The exception: FROM should be
	origin zero here.  Consistently treat it as such.  Simplify code
	which shrinks and possibly deletes intervals.
	(adjust_intervals_for_deletion): Treat start as origin 1; our
	caller does.
	(set_point): Use buffer positions throughout, not a mix of buffer
	posns and origin zero posns.
	(get_local_map): Remove special case for POSITION at end of buffer;
	find_interval handles that case correctly.
	(verify_interval_modification): Remove special case for START at
	end of buffer.
	* textprop.c (validate_interval_range): End-of-buffer/string
	positions no longer need special handling.

	* intervals.c (make_new_interval): #if 0 this out.  Nobody calls it.
1993-07-06 14:53:54 +00:00
Jim Blandy
ac811a55ab * fns.c (Fsubstring, concat): Pass all six arguments to
copy_text_properties.

	* textprop.c (copy_text_properties): New function, from David
	Gillespie.
	* intervals.h: Declare copy_text_properties.
	* fns.c: #include "intervals.h".
	(Fsubstring): Copy text properties to result string.
	(concat): Copy text properties to result string.
	* ymakefile (fns.o): Note that this depends on INTERVAL_SRC.
1993-07-06 14:43:32 +00:00