Commit graph

19090 commits

Author SHA1 Message Date
Richard M. Stallman
8a6fd2a78d (Fformat_mode_line): First arg now required. 2005-01-06 17:47:18 +00:00
Steven Tamm
e0e76ab914 * macfns.c: Include sys/param.h.
[TARGET_API_MAC_CARBON] (mac_nav_event_callback): New declaration
	and function.
	[TARGET_API_MAC_CARBON] (Fx_file_dialog): Use MAXPATHLEN for size
	of filename string.  Set event callback function when creating
	dialog boxes.  Add code conversions for filenames.  Don't dispose
	apple event descriptor record if failed to create it.
* macterm.c: Include sys/param.h.
	[USE_CARBON_EVENTS] (mac_handle_window_event): Add handler for
	kEventWindowUpdate.
	(install_window_handler) [USE_CARBON_EVENTS]: Register it.
	(do_ae_open_documents) [TARGET_API_MAC_CARBON]: Get FSRef instead
	of FSSpec from apple event descriptor record.
	(do_ae_open_documents) [TARGET_API_MAC_CARBON]: Use MAXPATHLEN for
	size of filename string.
	[TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise.
	[TARGET_API_MAC_CARBON] (mac_do_receive_drag): Return error when a
	file dialog is in action.
	[TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise.  Reject
	only when there are no filename items.  Set background color
	before (un)highlighting the window below the dragged items.
	(XTread_socket) [!USE_CARBON_EVENTS]: Don't call do_window_update.
2005-01-06 02:53:39 +00:00
Kenichi Handa
043bc640a7 *** empty log message *** 2005-01-06 00:58:07 +00:00
Kenichi Handa
fd4a9f8fae (encode_terminal_code): Fix buffer size computation. 2005-01-06 00:47:50 +00:00
Richard M. Stallman
dd496df6bc *** empty log message *** 2005-01-05 00:09:40 +00:00
Richard M. Stallman
721d04ba97 (Fformat_mode_line): Doc fix. 2005-01-05 00:09:29 +00:00
Stefan Monnier
026cdede85 (refill_memory_reserve): Move.
(emacs_blocked_free, emacs_blocked_malloc, emacs_blocked_realloc)
(reset_malloc_hooks, uninterrupt_malloc) [SYNC_INPUT]: Don't define.
2005-01-04 20:22:41 +00:00
Richard M. Stallman
d57c7572e8 *** empty log message *** 2005-01-04 03:00:45 +00:00
Richard M. Stallman
fa3c342659 (window_scroll_pixel_based): Don't correct preserve_y
for CURRENT_HEADER_LINE_HEIGHT when moving backwards.
2005-01-04 03:00:21 +00:00
Kenichi Handa
d8ca23a0de *** empty log message *** 2005-01-04 00:49:57 +00:00
Jason Rumney
b14f868ca5 *** empty log message *** 2005-01-04 00:44:02 +00:00
Jason Rumney
ad5674f5a1 (w32_load_system_font): Set FONT_WIDTH to maximum, not
average width. Set fontp->average_width and fontp->space_width to
their appropriate values.
2005-01-03 22:53:30 +00:00
Jason Rumney
3aefd49fb9 (x_new_font): Set FRAME_COLUMN_WIDTH to fontp->average_width,
not FONT_WIDTH.  Set FRAME_SPACE_WIDTH to fontp->space_width.
2005-01-03 22:52:51 +00:00
Jason Rumney
a4d75ad7ce (w32_load_bdf_font): Set fontp->average_width and
fontp->space_width to FONT_WIDTH so they are valid.
2005-01-03 22:52:01 +00:00
Steven Tamm
e169f939a5 * macterm.c (x_new_font): Set FRAME_SPACE_WIDTH.
(x_font_min_bounds, XLoadQueryFont): Use the correct font width
	metrics for max and min bounds.
	(x_load_font): Correctly calculate average font width metrics.
2005-01-03 16:49:35 +00:00
Richard M. Stallman
19996af44a *** empty log message *** 2005-01-02 23:46:12 +00:00
Richard M. Stallman
303b041210 (Fgarbage_collect): Don't truncate_undo_list on dead buffers. 2005-01-02 22:52:23 +00:00
Richard M. Stallman
b437860aad (struct it): New element ellipsis_p.
(struct glyph_row): New element ends_in_ellipsis_p.
2005-01-01 01:36:48 +00:00
Richard M. Stallman
f323e507d0 (setup_for_ellipsis, get_next_display_element):
Set it->ellipsis_p to 1 or 0.
(display_line): Record whether row ends in mid-ellipsis.
(set_cursor_from_row): If ends in ellipsis. find start of it.
(cursor_row_p): If PT's at the end of the ellipsis the row
ends within, don't display cursor on this row.

(BUFFER_POS_REACHED_P): We haven't reached the specified
position if we're reading from something other than the buffer.
2005-01-01 01:34:22 +00:00
Jan Djärv
42d02da077 * xterm.c (handle_one_xevent): Clear area in expose event for GTK. 2004-12-31 18:16:10 +00:00
Richard M. Stallman
1db7dd46a1 *** empty log message *** 2004-12-31 15:21:56 +00:00
Richard M. Stallman
940f53e5f8 (window_scroll_pixel_based): Only look at
Vscroll_preserve_screen_position if the old PT can't be kept.
(syms_of_window) <scroll-preserve-screen-position>: Doc fix.
2004-12-31 15:07:48 +00:00
Kim F. Storm
29aa4ce71f (x_produce_glyphs): Fix last change. 2004-12-30 18:07:07 +00:00
Kim F. Storm
33b2f4eaac *** empty log message *** 2004-12-30 18:02:30 +00:00
Kim F. Storm
99c71e5140 (get_line_height_property): New function extracted from
original calc_line_height_property.
(calc_line_height_property): Rework.  Handle t and (nil . ratio).
(x_produce_glyphs): Use them to handle line-height and
line-spacing according to new height spec.
(Qtotal): Remove.
(syms_of_xdisp): Remove defsubr and intern for Qtotal.
2004-12-30 18:01:59 +00:00
Kim F. Storm
1225f637fb (Line Height): Total line-height is now specified
in line-height property of form (HEIGHT TOTAL).  Swap (FACE . RATIO)
in cons cells.  (nil . RATIO) is relative to actual line height.
Use line-height `t' instead of `0' to get minimum height.
2004-12-30 18:01:43 +00:00
Kenichi Handa
c243063e8e *** empty log message *** 2004-12-30 12:45:22 +00:00
Kenichi Handa
37a3c7744c (Finsert_file_contents): Don't use
current_buffer->buffer_file_coding_system even if REPLACE is
non-nil.  Call Qafter_insert_file_set_coding with the second arg
VISIT.
2004-12-30 12:28:41 +00:00
Kenichi Handa
6875d1ae8c (x_new_font): Set FRAME_COLUMN_WIDTH to
fontp->average_width, not FONT_WIDTH.  Set FRAME_SPACE_WIDTH to
fontp-?space_width..
(x_load_font): Calculate fontp->space_width and
fontp->average_width.
(x_term_init): Initialize dpyinfo->Xatom_AVERAGE_WIDTH.
2004-12-30 12:26:31 +00:00
Kenichi Handa
7335e61a83 (x_produce_glyphs): Calculate tab width by
FRAME_SPACE_WIDTH, not FRAME_COLUMN_WIDTH.
2004-12-30 12:25:28 +00:00
Kenichi Handa
7e2d9efd85 (struct x_display_info): New member Xatom_AVERAGE_WIDTH. 2004-12-30 12:24:39 +00:00
Kenichi Handa
0fc63cc426 (struct frame): New member space_width.
(FRAME_SPACE_WIDTH): New macro.
2004-12-30 12:24:03 +00:00
Kenichi Handa
c773180555 (struct font_info): New members space_width and
average_width.
2004-12-30 12:23:24 +00:00
Steven Tamm
456e761bec * macterm.c (SelectionRange): Add Xcode position apple event struct.
(do_ae_open_documents): Handle Xcode-style file position open
	events.
* term/mac-win.el (mac-drag-n-drop): Handle drag-n-drop events
	that include line numbers.
2004-12-30 02:04:31 +00:00
Luc Teirlinck
188577ceca (syms_of_buffer) <vertical-scroll-bar>: Correct typo. 2004-12-29 22:18:41 +00:00
Richard M. Stallman
99ec74b964 *** empty log message *** 2004-12-29 20:41:37 +00:00
Richard M. Stallman
7c6b20070e (syms_of_buffer) <vertical-scroll-bar>: Doc fix. 2004-12-29 20:39:38 +00:00
Steven Tamm
30c92fab79 * term/mac-win.el: Require x-dnd.
(mac-drag-n-drop): Sync with W32 version.  Use x-dnd.el functions.
* macfns.c (install_window_handler): Modify extern to return OSErr
	value.
	(mac_window): Handle return value of install_window_handler.
* macterm.c (reflect_byte): Remove function.
	(mac_create_bitmap_from_bitmap_data): Don't call it.  Lookup table
	instead.
	(mac_do_font_lists): Simplify calculation of the longest
	nonspecial string.
	[TARGET_API_MAC_CARBON] (init_mac_drag_n_drop): Remove function
	and declaration.
	(mac_initialize) [TARGET_API_MAC_CARBON]: Don't call it.
	[TARGET_API_MAC_CARBON] (mac_do_track_drag): New function and
	declaration.
	(install_window_handler): Return OSErr value.
	(install_window_handler) [TARGET_API_MAC_CARBON]: Register
	handlers for tracking/receiving drag-and-drop items.
	(do_ae_open_documents): Generate unibyte strings for filenames.
	[TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise.  Reject
	only non-filename items.  Set event modifiers.  Set return value.
2004-12-29 17:25:02 +00:00
Kim F. Storm
a2c7e69a18 *** empty log message *** 2004-12-29 00:10:31 +00:00
Dan Nicolaescu
4b9829242b (decode_coding): Fix previous change. 2004-12-28 18:22:55 +00:00
Richard M. Stallman
93fdf45f65 (back_to_previous_visible_line_start):
Don't call handle_display_prop.
2004-12-28 17:55:12 +00:00
Dan Nicolaescu
5bdca8af0d (decode_coding_XXX, decode_composition_emacs_mule)
(decode_coding_emacs_mule, encode_coding_emacs_mule)
(decode_coding_iso2022, encode_designation_at_bol)
(encode_coding_iso2022, decode_coding_sjis_big5, decode_eol)
(decode_coding): Constify arguments and local vars.
2004-12-28 14:50:49 +00:00
Jan Djärv
95bdef2ed4 (popup_get_selection): Remove parameter down_on_keypress.
(create_and_show_popup_menu, create_and_show_dialog): Remove
parameter down_on_keypress to popup_get_selection.
2004-12-27 20:56:56 +00:00
Jan Djärv
33385c6fa0 * xmenu.c (popup_get_selection): Only pop down dialogs
on C-g and Escape.
2004-12-27 20:34:03 +00:00
Steven Tamm
b15325b22a * dispextern.h: Change HAVE_CARBON to MAC_OS.
(struct glyph_string): Likewise.
* emacs.c (main) [MAC_OS8]: Call mac_term_init instead of
	mac_initialize.
* fileio.c (Fnext_read_file_uses_dialog_p, Fread_file_name):
	Change TARGET_API_MAC_CARBON to HAVE_CARBON.
* fns.c (vector): Change MAC_OSX to MAC_OS.
* frame.c (x_set_frame_parameters, x_report_frame_params)
	(x_set_fullscreen): Remove #ifndef HAVE_CARBON.
	(x_set_border_width, Vdefault_frame_scroll_bars): Change
	HAVE_CARBON to MAC_OS.
* image.c [MAC_OS]: Include sys/stat.h.
	[MAC_OS && !MAC_OSX]: Include sys/param.h, ImageCompression.h, and
	QuickTimeComponents.h.
* mac.c [!MAC_OSX] (mac_wait_next_event): Add extern.
	[!MAC_OSX] (select): Use mac_wait_next_event.
	[!MAC_OSX] (run_mac_command): Change EXEC_SUFFIXES to
	Vexec_suffixes.
	[!MAC_OSX] (select, run_mac_command): Change `#ifdef
	TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'.
	(mac_clear_font_name_table): Add extern.
	(Fmac_clear_font_name_table): New defun.
	(syms_of_mac): Defsubr it.
	[MAC_OSX] (SELECT_POLLING_PERIOD_USEC): New define.
	[MAC_OSX] (select_and_poll_event): New function.
	[MAC_OSX] (sys_select): Use it.
	[MAC_OSX && SELECT_USE_CFSOCKET] (socket_callback): New function.
	[MAC_OSX && SELECT_USE_CFSOCKET]
	(SELECT_TIMEOUT_THRESHOLD_RUNLOOP, EVENT_CLASS_SOCK): New defines.
	[MAC_OSX] (sys_select) [SELECT_USE_CFSOCKET]: Use CFSocket and
	RunLoop for simultaneously monitoring two kinds of inputs, window
	events and process outputs, without periodically polling.
* macfns.c (mac_initialized): Remove extern.
	(stricmp): Put in #if 0.  All callers changed to use xstricmp in
	xfaces.c.
	(strnicmp): Decrement `n' at the end of each loop, not the
	beginning.
	(check_mac): Use the term "Mac native windows" instead of "Mac
	OS".
	(check_x_display_info, x_display_info_for_name): Sync with xfns.c.
	(mac_get_rdb_resource): New function (from w32reg.c).
	(x_get_string_resource): Use it.
	(install_window_handler): Add extern.
	(mac_window): New function.
	(Fx_create_frame): Use it instead of make_mac_frame.  Set
	parameter for Qfullscreen.  Call x_wm_set_size_hint.
	(Fx_open_connection, Fx_close_connection): New defuns.
	(syms_of_macfns): Defsubr them.
	(x_create_tip_frame) [TARGET_API_MAC_CARBON]: Add
	kWindowNoUpdatesAttribute to the window attribute.
	(x_create_tip_frame) [!TARGET_API_MAC_CARBON]: Use NewCWindow.
	(x_create_tip_frame): Don't call ShowWindow.
	(Fx_show_tip): Call ShowWindow.
	(Fx_file_dialog): Change `#ifdef TARGET_API_MAC_CARBON' to `#if
	TARGET_API_MAC_CARBON'.
	(mac_frame_parm_handlers): Set handlers for Qfullscreen.
	(syms_of_macfns) [MAC_OSX]: Initialize mac_in_use to 0.
* macgui.h [!MAC_OSX]: Don't include Controls.h.  Include
	Windows.h.
	(Window): Typedef to WindowPtr and move outside `#if
	TARGET_API_MAC_CARBON'.
	(XSizeHints): New struct.
* macterm.c (x_update_begin, x_update_end)
	[TARGET_API_MAC_CARBON]: Disable screen updates during update of a
	frame.
	(x_draw_glyph_string_background, x_draw_glyph_string_foreground)
	[MAC_OS8]: Use XDrawImageString/XDrawImageString16.
	(construct_mouse_click): Put in #if 0.
	(x_check_fullscreen, x_check_fullscreen_move): Remove decls.
	(x_scroll_bar_create, x_scroll_bar_handle_click): Change `#ifdef
	TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'.
	(activate_scroll_bars, deactivate_scroll_bars)
	[!TARGET_API_MAC_CARBON]: Use ActivateControl/DeactivateControl.
	(x_make_frame_visible) [TARGET_API_MAC_CARBON]: Reposition window
	if the position is neither user-specified nor program-specified.
	(x_free_frame_resources): Free size_hints.
	(x_wm_set_size_hint): Allocate size_hints if needed.  Set
	size_hints.
	(mac_clear_font_name_table): New function.
	(mac_do_list_fonts): Initialize font_name_table if needed.
	(x_list_fonts): Don't initialize font_name_table.  Add BLOCK_INPUT
	around mac_do_list_fonts.
	(mac_unload_font): New function.
	(x_load_font): Add BLOCK_INPUT around XLoadQueryFont.
	(init_mac_drag_n_drop, mac_do_receive_drag): Enclose declarations
	and definitions with #if TARGET_API_MAC_CARBON.
	[USE_CARBON_EVENTS] (mac_handle_window_event): Add decl.
	(install_window_handler): Add decl.
	(do_window_update): Add BeginUpdate/EndUpdate for the tooltip
	window.  Use UpdateControls.  Get the rectangle that should be
	updated and restrict the target of expose_frame to it.
	(do_grow_window): Set minimum height/width according to
	size_hints.
	(do_grow_window) [TARGET_API_MAC_CARBON]: Use ResizeWindow.
	(do_zoom_window): Don't use x_set_window_size.
	[USE_CARBON_EVENTS] (mac_handle_window_event): New function.
	(install_window_handler): New function.
	[!USE_CARBON_EVENTS] (mouse_region): New variable.
	[!USE_CARBON_EVENTS] (mac_wait_next_event): New function.
	(XTread_socket) [USE_CARBON_EVENTS]: Move call to
	GetEventDispatcherTarget inside BLOCK_INPUT.
	(XTread_socket) [!USE_CARBON_EVENTS]: Use mac_wait_next_event.
	Update mouse_region when mouse is moved.
	(make_mac_frame): Remove.
	(make_mac_terminal_frame): Put in #ifdef MAC_OS8.  Initialize
	mouse pointer shapes.  Change values of f->left_pos and
	f->top_pos.  Don't use make_mac_frame.  Use NewCWindow.  Don't
	call ShowWindow.
	(mac_initialize_display_info) [MAC_OSX]: Create mac_id_name from
	Vinvocation_name and Vsystem_name.
	(mac_make_rdb): New function (from w32term.c).
	(mac_term_init): Use it.  Add BLOCK_INPUT.  Error if display has
	already been opened.  Don't pass argument to
	mac_initialize_display_info.  Don't set dpyinfo->height/width.
	Add entries to x_display_list and x_display_name_list.
	(x_delete_display): New function.
	(mac_initialize): Don't call mac_initialize_display_info.
	(syms_of_macterm) [!MAC_OSX]: Don't call Fprovide.
* macterm.h (check_mac): Add extern.
	(struct mac_output): New member size_hints.
	(FRAME_SIZE_HINTS): New macro.
	(mac_unload_font): Add extern.
* xdisp.c (expose_window, expose_frame): Remove kludges for Mac.
* xfaces.c (clear_font_table) [MAC_OS]: call mac_unload_font.
2004-12-27 17:27:30 +00:00
Richard M. Stallman
ebbd14f151 *** empty log message *** 2004-12-27 16:54:00 +00:00
Richard M. Stallman
fc2c88874c (Fbuffer_disable_undo): Deleted (moved to simple.el).
(syms_of_buffer): Don't defsubr it.
2004-12-27 16:07:42 +00:00
Richard M. Stallman
ec2258fa88 (list_processes_1): Set undo_list instead of calling Fbuffer_undo_list. 2004-12-27 16:06:43 +00:00
Richard M. Stallman
92d2947be4 Comment changes. 2004-12-27 16:05:57 +00:00
Richard M. Stallman
62a29071d6 (Fdefalias): Use (defun . FN_NAME) in LOADHIST_ATTACH. 2004-12-27 16:03:49 +00:00