ChangeLog 633 KB
Newer Older
1 2 3 4 5 6
2005-03-03  Thien-Thi Nguyen  <ttn@gnu.org>

	* fileio.c (FILE_SYSTEM_CASE): Define macro if not already defined.
	(Ffile_name_directory): Use FILE_SYSTEM_CASE unconditionally.
	(Fexpand_file_name): Likewise.

7 8 9 10 11
2005-03-03  Thien-Thi Nguyen  <ttn@gnu.org>

	* emacs.c (Fkill_emacs): Use EXIT_SUCCESS;
	no longer special-case VMS.  Add bogus return value.

Kim F. Storm's avatar
Kim F. Storm committed
12 13 14 15 16
2005-03-02  Kim F. Storm  <storm@cua.dk>

	* dispextern.h (XASSERTS): Define to 0 if not already defined.
	(xassert) [!XASSERTS]: Define dummy version.

Kim F. Storm's avatar
Kim F. Storm committed
17 18 19 20 21
2005-03-02  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (redisplay_window): YABX (yet another bogus xassert).
	Reported by David Kastrup.

Kim F. Storm's avatar
Kim F. Storm committed
22 23 24 25 26
2005-03-01  Ehud Karni  <ehud@unix.mvs.co.il>

	* xdisp.c (get_next_display_element): Fix control and escape
	glyph from display vector.

27 28 29 30
2005-03-01  Stefan Monnier  <monnier@iro.umontreal.ca>

	* keyboard.c (Fposn_at_x_y): Check integerness of X and Y.

31 32
2005-02-27  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

33
	* gtkutil.c (xg_resize_outer_widget): Remove unneeded call to
34 35
	gtk_window_resize and x_wm_set_size_hint.

Kim F. Storm's avatar
Kim F. Storm committed
36 37 38 39 40 41 42
2005-02-25  Kim F. Storm  <storm@cua.dk>

	* dispextern.h (OVERLAY_STRING_CHUNK_SIZE): Increase from 3 to 16.

	* xdisp.c (init_from_display_pos): Don't read past end of
	it->overlay_strings array.

Lute Kamstra's avatar
Lute Kamstra committed
43 44 45 46
2005-02-25  Stephan Stahl <stahl@eos.franken.de>  (tiny change)

	* buffer.c (syms_of_buffer): Fix typo.

Lute Kamstra's avatar
Lute Kamstra committed
47 48 49 50
2005-02-23  Lute Kamstra  <lute@gnu.org>

	* buffer.c (Foverlay_buffer): Doc fix.

Kim F. Storm's avatar
Kim F. Storm committed
51 52
2005-02-22  Kim F. Storm  <storm@cua.dk>

Kim F. Storm's avatar
Kim F. Storm committed
53 54 55
	* minibuf.c (Ftry_completion, Fall_completions): Allow both string
	and symbol keys in alists and hash tables.

Kim F. Storm's avatar
Kim F. Storm committed
56 57
	* xdisp.c (fast_find_position): Fix search for start of overlay.

Kim F. Storm's avatar
Kim F. Storm committed
58 59 60 61 62
2005-02-21  Kim F. Storm  <storm@cua.dk>

	* window.c (window_scroll_pixel_based): When scrolling backwards,
	handle partial visible line at end of window even when we hit PT.

63
2005-02-21  Stefan Monnier  <monnier@iro.umontreal.ca>
Stefan Monnier's avatar
Stefan Monnier committed
64 65 66

	* keymap.h: Declare Fcurrent_active_maps, used in doc.c.

Kim F. Storm's avatar
Kim F. Storm committed
67 68 69 70 71 72
2005-02-21  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (move_it_vertically_backward): Eliminate two xasserts.
	I think those asserts are bogus if buffer contains invisible text
	or images.

Kim F. Storm's avatar
Kim F. Storm committed
73 74 75 76
2005-02-21  David Kastrup <dak@gnu.org>

	* gtkutil.c (xg_create_frame_widgets): UNBLOCK_INPUT on error.

Kim F. Storm's avatar
Kim F. Storm committed
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
2005-02-20  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (pos_visible_p): Be sure to move to the specified
	position.  Always get the full ascent / descent of the
	corresponding row, to return reliable rtop and rbot values.
	(back_to_previous_visible_line_start): Fix 2005-01-18 change.
	Must look one character back, as back_to_previous_line_start
	returns position after the newline.
	(move_it_vertically_backward): Fix heuristic for when to move further
	back in case line_height * 2/3 is larger than window height.
	(cursor_row_fully_visible_p): Rename make_cursor_line_fully_visible_p
	as it does not do anything anymore.  Add arg current_matrix_p to
	use current matrix rather than desired matrix when set.
	(try_cursor_movement): Don't scroll to make cursor row fully
	visible if cursor didn't move.  This avoids unexpected recentering
	in case of blinking cursor or accepting process output.
	Use current matrix to check cursor row visibility.
	(redisplay_window): Fix whether to recenter or move to top in case
	cursor line is taller than window height.
	(find_first_unchanged_at_end_row): Stop search if we reach a row
	which not enabled (instead of abort).

Kim F. Storm's avatar
Kim F. Storm committed
99 100
2005-02-18  Kim F. Storm  <storm@cua.dk>

Kim F. Storm's avatar
Kim F. Storm committed
101 102 103 104
	* xfaces.c (Finternal_set_lisp_face_attribute): Allow :color property
	to be nil in a :box attribute value list; customize prints that
	as lisp value when no box color is specified.

Kim F. Storm's avatar
Kim F. Storm committed
105 106 107 108 109
	* .gdbinit (pitx, pit): Pretty print display iterator.
	(prowx, prow): Pretty print glyph row.
	(pcursorx, pcursor): Pretty print a window cursor.
	(pwinx, pwin): Pretty print struct window.

Stefan Monnier's avatar
Stefan Monnier committed
110 111 112 113
2005-02-18  Stefan Monnier  <monnier@iro.umontreal.ca>

	* alloc.c (BLOCK_BYTES): Harmless typo.

114 115 116 117 118 119 120
2005-02-17  Andreas Schwab  <schwab@suse.de>

	* xfns.c (hack_wm_protocols): Use correct type for last parameter
	of XGetWindowProperty to avoid aliasing issues.
	(Fx_window_property): Likewise.

	* xselect.c (Fx_disown_selection_internal): Use union of struct
121
	input_event and struct selection_input_event to avoid aliasing issues.
122 123 124 125 126

	* xterm.c (handle_one_xevent): Use union of struct input_event and
	struct selection_input_event to avoid aliasing issues.
	(SET_SAVED_MENU_EVENT): Adapt reference to inev.

Kim F. Storm's avatar
Kim F. Storm committed
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
2005-02-17  Kim F. Storm  <storm@cua.dk>

	* dispextern.h (enum it_method): New enum.
	(GET_FROM_*): Its members.
	(struct it): Change member method from function pointer to enum.

	* xdisp.c (check_it, init_from_display_pos, handle_stop)
	(setup_for_ellipsis, handle_single_display_spec)
	(handle_composition_prop, next_overlay_string)
	(get_overlay_strings, reseat_1, reseat_to_string)
	(next_element_from_ellipsis, BUFFER_POS_REACHED_P)
	(in_display_vector_p, display_line, get_next_display_element):
	Change it->method from function pointer to enum.
	(get_next_element): New array to map it->method to function.
	(get_next_display_element): Use it.
	(set_iterator_to_next): Use switch instead of if/else chain.

Jason Rumney's avatar
Jason Rumney committed
144
2005-02-15  Benjamin Riefenstahl  <Benjamin.Riefenstahl@epost.de>
145 146 147 148 149

	* w32select.c: Summary: Thorough rework to implement Unicode
	clipboard operations and delayed rendering.

	Drop last_clipboard_text and related code, keep track of
150
	ownership via clipboard_owner instead.  Drop old #if0 sections.
151 152 153 154 155

	(DEFAULT_LCID, ANSICP, OEMCP, QUNICODE, QANSICP, QOEMCP)
	(clipboard_owner, modifying_clipboard, cfg_coding_system)
	(cfg_codepage, cfg_lcid, cfg_clipboard_type, current_text)
	(current_coding_system, current_requires_encoding)
156 157
	(current_num_nls, current_clipboard_type, current_lcid):
	New static variables.
158 159 160 161

	(convert_to_handle_as_ascii, convert_to_handle_as_coded)
	(render, render_all, run_protected, lisp_error_handler)
	(owner_callback, create_owner, setup_config)
162 163
	(enum_locale_callback, cp_from_locale, coding_from_cp):
	New local functions.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185

	(term_w32select, globals_of_w32select): New global functions.

	(Fw32_set_clipboard_data): Ignore parameter FRAME, use
	clipboard_owner instead.  Use delayed rendering and provide
	all text formats.  Provide CF_LOCALE if necessary.

	(Fw32_get_clipboard_data): Handle CF_UNICODETEXT and
	CF_LOCALE.  Fall back to CF_TEXT, if CF_UNICODETEXT is not
	available.  Force DOS line-ends for decoding.

	(Fx_selection_exists_p): Handle CF_UNICODETEXT.

	(syms_of_w32select): Init and register new variables.

	* w32.h: Add prototypes for globals_of_w32select and
	term_w32select.  Make the neighboring K&R declarations into
	prototypes, too.

	* emacs.c: Include w32.h to get function prototypes.
	(main): Call globals_of_w32select.

Kim F. Storm's avatar
Kim F. Storm committed
186
	* w32.c (term_ntproc): Call term_w32select.
187 188 189

	* s/ms-w32.h: Guard MSC-specific #pragmas with an #ifdef.

Kim F. Storm's avatar
Kim F. Storm committed
190 191 192 193 194
2005-02-16  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (BUFFER_POS_REACHED_P): Return true if pos reached and
	at end of display vector.

195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
2005-02-15  Richard M. Stallman  <rms@gnu.org>

	* xdisp.c (get_next_display_element): Fix escape-glyph criterion
	for mode and header lines.

	* lread.c (syms_of_lread) <user-init-file>: Doc fix.

	* keymap.h (describe_map_tree): Change decl.

	* keyboard.c (command_loop_1): Always use safe_run_hooks
	to run Qdeferred_action_function.

	* keymap.c (describe_map_tree): New arg MENTION_SHADOW.  Calls changed.
	(describe_map, describe_vector): Likewise.  When it's 1,
	don't omit shadowed bindings, instead mark them as shadowed.

	* doc.c (Fsubstitute_command_keys): Compute list of shadowing maps
	for describe_map_tree.  Pass 1 for MENTION_SHADOW.

	* data.c (Fsetq_default): Allow no arg case.

216 217 218 219 220 221 222 223 224
2005-02-14  Kenichi Handa  <handa@m17n.org>

	* coding.c (encode_coding_string): Always return a unibyte string.
	If NOCOPY is nonzero and there's no need of encoding, make STR
	unibyte directly.

	* xselect.c (lisp_data_to_selection_data): If OBJ is a non-ASCII
	multibyte string, signal an error instead of aborting.

225 226 227 228
2005-02-12  Dan Nicolaescu  <dann@ics.uci.edu>

	* keyboard.c: If HAVE_FCNTL_H include fcntl.h.

Kim F. Storm's avatar
Kim F. Storm committed
229 230 231 232
2005-02-12  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (expose_window): Don't fix overlaps for mode lines.

Kim F. Storm's avatar
Kim F. Storm committed
233 234 235 236 237
2005-02-10  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (try_window_id): Set first_unchanged_at_end_row to NULL
	if it moves outside window or it doesn't display text.

Kim F. Storm's avatar
Kim F. Storm committed
238 239 240 241 242
2005-02-09  Kim F. Storm  <storm@cua.dk>

	* undo.c (Fprimitive_undo): Check that undo function does not
	switch buffer.

243 244 245 246 247 248 249
2005-02-08  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xselect.c (selection_data_to_lisp_data): For the special case
	type == XA_ATOM, data contains array of int, not array of Atom.
	(x_property_data_to_lisp, selection_data_to_lisp_data): Comment
	update: data must be array of int for format == 32.

250 251 252 253
2005-02-08  Stefan Monnier  <monnier@iro.umontreal.ca>

	* undo.c (Fprimitive_undo): Check veracity of delta,start,end.

254 255
2005-02-07  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

256 257 258
	* xfns.c (Fx_change_window_property): Use long array when format is 32.
	(Fx_window_property): If format is 32 and long is bigger than 32 bits,
	convert long array returned from XGetWindowProperty to an int array.
259 260
	(x_set_tool_bar_lines): Check that width and height is greater than
	zero before clearing area.
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275

	* xselect.c (x_reply_selection_request): Pass long array to
	XChangeProperty so that 64 bit longs are handeled correctly.
	(x_get_window_property): If format is 32 and long is bigger than 32
	bits convert data from XGetWindowProperty from long array to int array.
	(lisp_data_to_selection_data): When the input is a vector and the
	format is 32, allocate a long array even if long is bigger than 32 bits.
	(x_fill_property_data): Use char, short and long as the man page
	for XChangeProperty specifies.  This way the data returned is OK for
	both 32 and 64 bit machines.
	(x_handle_dnd_message): Calculate size correctly even for 64 bit
	machines.
	(Fx_send_client_event): Undo change from 2005-02-05,
	x_fill_property_data now handles that case.

276
	* xfns.c (Fx_backspace_delete_keys_p): Add comment about the
277 278
	reason for the approach in the code.

Kim F. Storm's avatar
Kim F. Storm committed
279 280 281 282
2005-02-07  Kim F. Storm  <storm@cua.dk>

	* undo.c (Fprimitive_undo): Record max one dummmy apply element.

283 284 285 286 287 288
2005-02-06  Richard M. Stallman  <rms@gnu.org>

	* eval.c (Frun_hook_with_args)
	(Frun_hook_with_args_until_success)
	(Frun_hook_with_args_until_failure): Doc fixes.

289 290
2005-02-05  Andreas Schwab  <schwab@suse.de>

291
	* sysdep.c (sys_subshell): Properly terminate execlp argument list.
292

293 294 295 296 297
2005-02-05  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xselect.c (Fx_send_client_event, x_handle_dnd_message): Handle
	the longs in a XClientMessageEvent correctly when long is 64 bits.

Eli Zaretskii's avatar
Eli Zaretskii committed
298 299 300 301 302
2005-02-05  Eli Zaretskii  <eliz@gnu.org>

	* xfaces.c (face_color_supported_p): Use HAVE_WINDOW_SYSTEM
	instead of HAVE_X_WINDOWS, for non-X windowed sessions.

303 304 305 306 307 308 309 310 311 312 313 314
2005-02-03  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xmenu.c (menubar_selection_callback): Force out GTK buffered
	events so the menu event comes after them.  This is to prevent sit-for
	from exiting on buffered events directly after a menu selection,
	lisp code for Help => About Emacs uses sit-for.

	* gtkutil.c (create_menus): Connect selection-done event instead of
	the deactivate event to deactivate_cb.  This will make the last
	leave event come before the call to deactivate_cb, so the leave
	event does not make sit-for exit after a menu selection.

Kim F. Storm's avatar
Kim F. Storm committed
315 316 317 318 319 320 321 322 323
2005-02-03  Kim F. Storm  <storm@cua.dk>

	* dispnew.c (build_frame_matrix_from_leaf_window)
	 [!GLYPH_DEBUG]: Fix xassert.

	* xfaces.c (x_free_gc) [!GLYPH_DEBUG]: Fix xassert.

	* xfns.c (unwind_create_frame) [!GLYPH_DEBUG]: Fix xassert.

324 325 326 327 328 329 330
2005-02-03  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* mac.c: Use MAC_OS_X_VERSION_MAX_ALLOWED to conditionalize by
	the compiling OS version.

	* macfns.c (x_create_tip_frame): Likewise.

331
	* macterm.c (mac_draw_string_common, x_make_frame_visible): Likewise.
332

333 334 335 336 337 338 339 340
2005-02-03  Richard M. Stallman  <rms@gnu.org>

	* xterm.c (x_error_quitter): On GCC 3 and up, specify noinline.

	* xdisp.c (echo_area_display): Clear echo_message_buffer.

	* buffer.c (Fbury_buffer): Doc fix.

341 342
2005-02-02  Steven Tamm  <steventamm@mac.com>

343 344
	* macfns.c (unwind_create_frame): Fixing compile error due to
	xassert being uncondition, but predicate is.
345
	* dispnew.c (update_window): Fixing compile error due to
346
	xassert being uncondition, but predicate is.
347

348 349 350 351
2005-02-02  Miles Bader  <miles@gnu.org>

	* dispextern.h (xassert): Enable unconditionally.

Kim F. Storm's avatar
Kim F. Storm committed
352 353 354 355
2005-02-02  Kim F. Storm  <storm@cua.dk>

	* undo.c (Fprimitive_undo): Fix dummy apply undo entry.

Kenichi Handa's avatar
Kenichi Handa committed
356 357 358 359 360 361 362
2005-02-02  Kenichi Handa  <handa@m17n.org>

	* casefiddle.c (casify_object): Enable changing characters of
	different byte length.
	(casify_region): Fix loop condition, args to replace_range_2, and
	update opoint_byte.

363
	* insdel.c (replace_range_2): Fix bugs in adjusting markers and point.
Kenichi Handa's avatar
Kenichi Handa committed
364

Kim F. Storm's avatar
Kim F. Storm committed
365 366 367 368 369
2005-02-01  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (back_to_previous_visible_line_start): Reset iterator
	stack before calling handle_display_prop.

Kim F. Storm's avatar
Kim F. Storm committed
370 371 372 373 374 375 376 377 378
2005-01-31  Kim F. Storm  <storm@cua.dk>

	* undo.c (Qapply): New lisp var.
	(syms_of_undo): Intern and staticpro it.
	(Fprimitive_undo): Support formats (apply FUNNAME . ARGS) and
	(apply DELTA BEG END FUNNAME . ARGS) instead of (FUNNAME . ARGS).

	* buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.

379 380
2005-01-30  Jesper Harder  <harder@phys.au.dk>

Kim F. Storm's avatar
Kim F. Storm committed
381 382
	* macterm.c (syms_of_macterm) <mac-reverse-ctrl-meta>
	<mac-emulate-three-button-mouse>: Fix docstring indentation.
383

Luc Teirlinck's avatar
Luc Teirlinck committed
384 385 386
2005-01-29  Luc Teirlinck  <teirllm@auburn.edu>

	* undo.c (syms_of_undo) <undo-outer-limit>: Doc update.
387
	Increase value to 3 Meg.
Luc Teirlinck's avatar
Luc Teirlinck committed
388

389 390 391 392 393
2005-01-29  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xfns.c (show_hourglass): Use FRAME_X_WINDOW as parent for GTK,
	button events are not received otherwise.

394 395 396 397 398 399
2005-01-29  Richard M. Stallman  <rms@gnu.org>

	* buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.

	* undo.c (Fprimitive_undo): Handle (FUNNAME . ARGS) by calling FUNNAME.

Stefan Monnier's avatar
Stefan Monnier committed
400 401 402 403
2005-01-28  Stefan Monnier  <monnier@iro.umontreal.ca>

	* keymap.c (access_keymap): YAILOM.

Kim F. Storm's avatar
Kim F. Storm committed
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419
2005-01-27  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (get_phys_cursor_geometry): New function to calculate
	phys cursor position and size for hollow cursor.  Position is
	aligned with get_glyph_string_clip_rect and ensures that a hollow
	cursor is shown, even when the actual glyph is not visible.

	* dispextern.h (get_phys_cursor_geometry): Add prototype.

	* xterm.c (x_clip_to_row): Ensure y >= 0.
	(x_draw_hollow_cursor): Use get_phys_cursor_geometry.

	* w32term.c (x_draw_hollow_cursor): Use get_phys_cursor_geometry.

	* macterm.c (x_draw_hollow_cursor): Use get_phys_cursor_geometry.

420 421 422 423
2005-01-27  Stefan Monnier  <monnier@iro.umontreal.ca>

	* xterm.c (x_error_quitter): Add a prototype.  Make it static again.

Kim F. Storm's avatar
Kim F. Storm committed
424 425 426 427 428 429
2005-01-27  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (get_glyph_string_clip_rect): Always show a cursor
	glyph, even when row is only partially visible and actual cursor
	position is not visible.

430 431 432 433 434
2005-01-24  Richard M. Stallman  <rms@gnu.org>

	* xterm.c (x_error_quitter): No longer static, and moved after
	x_error_handler.

Kim F. Storm's avatar
Kim F. Storm committed
435 436 437 438 439
2005-01-24  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (move_it_by_lines): If we move forward after going too
	far back, cancel move if end position is same as start position.

440 441 442 443
2005-01-24  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* dispextern.h (struct glyph_string): New members clip_head and
	clip_tail.
Kim F. Storm's avatar
Kim F. Storm committed
444

445 446 447 448 449 450 451
	* xdisp.c (get_glyph_string_clip_rect): Restrict horizontal clip
	region to the area between clip_head and clip_tail.
	(draw_glyphs): Record the area that need to be actually redrawn to
	the new variables clip_head and clip_tail when there are
	overhangs.  Set values of these variables to the corresponding
	members in struct glyph_string.  Refine x coordinates for
	notice_overwritten_cursor using clip_head and clip_tail.
Kim F. Storm's avatar
Kim F. Storm committed
452

453 454 455 456 457
	* macgui.h (STORE_XCHARSETSTRUCT): New macro.

	* macterm.c (mac_compute_glyph_string_overhangs): Implement with
	QDTextBounds.
	(x_draw_glyph_string): Don't fill the background of the successor
Kim F. Storm's avatar
Kim F. Storm committed
458
	of a glyph with a right overhang if the successor will draw a cursor.
459
	(XLoadQueryFont): Obtain font metrics using QDTextBounds.
Kim F. Storm's avatar
Kim F. Storm committed
460
	(x_redisplay_interface): Add entry for compute_glyph_string_overhangs.
461

Kim F. Storm's avatar
Kim F. Storm committed
462 463
2005-01-24  Kim F. Storm  <storm@cua.dk>

464 465 466 467 468
	* window.c (window_scroll_pixel_based): Fix scrolling in the wrong
	direction if window height was smaller than next-screen-context-lines.
	Now always scroll at least one line in the requested direction.
	Ensure that we actually do scroll backwards when requested to do so.

Kim F. Storm's avatar
Kim F. Storm committed
469 470 471
	* xdisp.c (redisplay_window): Only try to make cursor line fully
	visible once (to avoid redisplay loop).

Kim F. Storm's avatar
Kim F. Storm committed
472 473
2005-01-23  Kim F. Storm  <storm@cua.dk>

Kim F. Storm's avatar
Kim F. Storm committed
474
	* window.c (Fpos_visible_in_window_p): Simplify return value for
Kim F. Storm's avatar
Kim F. Storm committed
475
	partially visible rows.
Kim F. Storm's avatar
Kim F. Storm committed
476 477
	(window_scroll_pixel_based): Adapt to that change.

Kim F. Storm's avatar
Kim F. Storm committed
478 479 480
	* window.c (window_scroll_pixel_based): Force moving to next line
	if scrolling doesn't move start point, e.g. if looking at tall image.

Kim F. Storm's avatar
Kim F. Storm committed
481
	* xdisp.c (pos_visible_p): Return 0 if non-interactive.
Kim F. Storm's avatar
Kim F. Storm committed
482 483
	Clear last_height before calling line_bottom_y to get real height.
	Fix calculation of y.
Kim F. Storm's avatar
Kim F. Storm committed
484

485 486 487
2005-01-22  Steven Tamm  <steventamm@mac.com>

	* s/darwin.h: Removed PTY_ITERATION from here.
488
	(DARWIN): Define.
489 490 491 492 493
	* process.c (init_process): Default process-connection-type to
	nil on darwin 6 or less, t if it is 7 or higher.  This way the
	broken pty behavior is still allowed on darwin 6 for interactive
	processes for people that know what they are doing.

Kim F. Storm's avatar
Kim F. Storm committed
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509
2005-01-22  Kim F. Storm  <storm@cua.dk>

	* window.c (auto_window_vscroll_p): New boolean.
	(syms_of_window): DEFVAR_BOOL it.
	(Fpos_visible_in_window_p): Extend return value to include RTOP
	and RBOT values if FULLY is nil.
	(window_scroll_pixel_based): Adjust vscroll for partially visible
	rows if auto_window_vscroll_p is set.
	(Fset_window_vscroll): Do nothing if vscroll is not modified.

	* xdisp.c (pos_visible_p): Replace FULLY arg by RTOP and RBOT args
	to return number of partially invisible pixels at top and bottom
	of the dislay row at POS.

	* lisp.h (pos_visible_p): Fix prototype.

510 511 512 513
2005-01-21  Richard M. Stallman  <rms@gnu.org>

	* fileio.c (Fcopy_file): Doc fix.

514 515 516 517 518 519
2005-01-21  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* gtkutil.c (xg_tool_bar_detach_callback): Remove unused variable bw.
	(xg_get_file_name): Move declaration ofx_use_old_gtk_file_dialog to
	start of function for older compilers.

520 521 522 523 524 525 526 527 528
2005-01-20  Richard M. Stallman  <rms@gnu.org>

	* editfns.c (Fmessage): If arg is "", return "" (as before).

	* keymap.c (access_keymap): Protect from bad value of meta_prefix_char.

	* .gdbinit (xgetptr, xgetint, xgettype): Copy $arg0 into a temp
	variable.

529 530
2005-01-20  Steven Tamm  <steventamm@mac.com>

531
	* editfns.c (Voperating_system_release): Add.
532 533
	(init_editfns): Assign new variable operating-system-release
	based on call to uname if available.
534
	(get_operating_system_release): Add function to
Kim F. Storm's avatar
Kim F. Storm committed
535
	allow c-level access to operating system release.
536 537 538

	* config.h: Regenerated.

539 540
	* s/darwin.h (PTY_ITERATION): Don't allow PTYs on darwin 6 or less.
	(MIN_PTY_KERNEL_VERSION): Define minimum kernel version for
541 542
	using ptys as '7'.

Kim F. Storm's avatar
Kim F. Storm committed
543 544
2005-01-20  Kim F. Storm  <storm@cua.dk>

Kim F. Storm's avatar
Kim F. Storm committed
545 546
	* alloc.c (STRING_MARKED_P, VECTOR_MARKED_P): Return boolean.

Kim F. Storm's avatar
Kim F. Storm committed
547 548 549 550 551 552 553
	* xterm.c (x_draw_glyph_string_box): Fix last_x for full width rows.
	Thanks to Chong Yidong <cyd@stupidchicken.com> for debugging this.

	* macterm.c (x_draw_glyph_string_box): Likewise.

	* w32term.c (x_draw_glyph_string_box): Likewise.

Kim F. Storm's avatar
Kim F. Storm committed
554 555
	* indent.c (Fvertical_motion): Temporarily disable selective display.

Kim F. Storm's avatar
Kim F. Storm committed
556 557
2005-01-19  Kim F. Storm  <storm@cua.dk>

Kim F. Storm's avatar
Kim F. Storm committed
558 559 560
	* xdisp.c (note_mode_line_or_margin_highlight): Fix :pointer
	image property.

Kim F. Storm's avatar
Kim F. Storm committed
561 562
	* fns.c (sweep_weak_table): Advance prev pointer when we keep a pair.

Kim F. Storm's avatar
Kim F. Storm committed
563 564 565 566 567
2005-01-18  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (fast_find_position): Backtrack to find first row if
	charpos is inside a display overlay that spans multiple lines.

Kenichi Handa's avatar
Kenichi Handa committed
568 569 570 571 572
2005-01-18  Kenichi Handa  <handa@m17n.org>

	* coding.c (decode_coding_iso2022): Translate invalid codes if
	translation-table is specified.

Kim F. Storm's avatar
Kim F. Storm committed
573 574 575 576 577 578 579
2005-01-18  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (back_to_previous_visible_line_start): Undo 2004-12-28
	change.  If handle_display_prop indicates newline is replaced by
	image or text, move back to start of relevant overlay or interval
	and continue scan from there.  Simplify.

Kim F. Storm's avatar
Kim F. Storm committed
580 581
2005-01-17  Kim F. Storm  <storm@cua.dk>

582 583
	* dispnew.c (mode_line_string, marginal_area_string):
	Fix off-by-one error in search for glyph.
Kim F. Storm's avatar
Kim F. Storm committed
584

585 586 587 588
2005-01-16  Kim F. Storm  <storm@cua.dk>

	* macterm.c (syms_of_macterm) <mac-allow-anti-aliasing>: Doc fix.

589 590
2005-01-16  Steven Tamm  <steventamm@mac.com>

591
	* macterm.c (mac_to_x_fontname): Remove spurious argument.
592

593 594 595 596
2005-01-16  Andreas Schwab  <schwab@suse.de>

	* macterm.c (mac_draw_string_common): Fix compilation on OSX 10.1.

597 598 599 600 601
2005-01-16  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* fringe.c (Fdefine_fringe_bitmap, init_fringe): When assigning
	fringe_faces, cast result from xmalloc/xrealloc to Lisp_Object *.

602 603 604
2005-01-16  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* keyboard.c (READABLE_EVENTS_DO_TIMERS_NOW)
605 606
	(READABLE_EVENTS_FILTER_EVENTS, READABLE_EVENTS_IGNORE_SQUEEZABLES):
	New flags for readable_events.
607
	(get_filtered_input_pending, readable_filtered_events): Remove.
608 609 610 611 612 613 614 615 616
	(tracking_off): Call readable_events and get_input_pending with
	flag READABLE_EVENTS_DO_TIMERS_NOW.
	(readable_events): Move code from old readable_filtered_events here,
	but check new READABLE_EVENTS_* in argument flags instead of previous
	two boolean arguments do_timers_now and filter_events.
	If we are doing mouse tracking and the mouse moved, return only if
	READABLE_EVENTS_IGNORE_SQUEEZABLES is not set in flags.
	(swallow_events): Call get_input_pending with flag
	READABLE_EVENTS_DO_TIMERS_NOW.
617
	(get_input_pending): Move code from old get_filtered_input_pending
618 619 620 621 622 623 624 625 626 627 628
	here.  Replace boolean arguments do_timers_now, filter_events with
	flags, and pass flags to readable_events.  Document new
	READABLE_EVENTS_* flags.
	(detect_input_pending_ignore_squeezables): New function.
	(detect_input_pending_run_timers): Call get_input_pending with flag
	READABLE_EVENTS_DO_TIMERS_NOW.
	(Finput_pending_p): Call get_input_pending with flags
	READABLE_EVENTS_DO_TIMERS_NOW and READABLE_EVENTS_FILTER_EVENTS.

	* dispnew.c (update_window, update_frame_1): Replace calls to
	detect_input_pending with detect_input_pending_ignore_squeezables
629
	so that redisplay is not paused if the event queue contains only
630 631 632 633
	mouse movements.

	* lisp.h: Declare detect_input_pending_ignore_squeezables.

634 635
2005-01-15  Steven Tamm  <steventamm@mac.com>

636 637 638
	* macterm.c (Vmac_use_core_graphics): Declare variable for
	mac-allow-anti-aliasing.
	(syms_of_macterm): DEFVAR_LISP and initialize it.
639
	(mac_draw_string_common): Use core graphics text rendering if
640
	mac-allow-anti-aliasing is enabled.
641

642 643 644
	* macfns.c (Fx_file_dialog): Save As dialog includes only the
	file name in the text box.

645 646
2005-01-15  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

647 648
	* macfns.c (x_set_foreground_color, x_set_background_color):
	Sync with xfns.c.
649 650 651 652
	(mac_window, x_create_tip_frame): Use XSetWindowBackground.
	* macterm.c (XSetBackground, XSetWindowBackground): New functions.
	* macterm.h (XSetBackground, XSetWindowBackground): Add externs.

Kim F. Storm's avatar
Kim F. Storm committed
653 654 655 656
2005-01-14  Kim F. Storm  <storm@cua.dk>

	* keyboard.c (Fposn_at_x_y): Add optional arg WHOLE.

657 658 659 660 661 662 663
2005-01-13  Richard M. Stallman  <rms@gnu.org>

	* keymap.c (Fcurrent_active_maps): Ignore Voverriding_local_map
	if Voverriding_terminal_local_map is non-nil.

	* keyboard.c (syms_of_keyboard): Doc fix.

Kim F. Storm's avatar
Kim F. Storm committed
664 665 666 667 668
2005-01-13  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (Fformat_mode_line): Fix last change.  Remove NO_PROPS arg
	(specify 0 for FACE instead). Reorder arg list.  Doc fix.

669 670 671 672 673 674 675
2005-01-12  Richard M. Stallman  <rms@gnu.org>

	* xdisp.c (Fformat_mode_line): New arg FACE specifies a default
	face property for characters that don't specify one.

	* fns.c (Frequire): Record in load-history unconditionally.

Kim F. Storm's avatar
Kim F. Storm committed
676 677 678 679 680 681 682 683 684 685 686 687
2005-01-10  Kim F. Storm  <storm@cua.dk>

	* dispextern.h (merge_faces): Rename from merge_into_realized_face.

	* xfaces.c (merge_faces): Rename from merge_into_realized_face.
	Callers changed.
	Add support to merge with lisp face id too (if face_name is t).

	* xdisp.c (get_next_display_element, next_element_from_display_vector):
	Don't lookup lface_id from display table glyphs here; instead use
	merge_faces to merge the lisp face id into current face.

Kim F. Storm's avatar
Kim F. Storm committed
688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704
2005-01-09  Kim F. Storm  <storm@cua.dk>

	* dispextern.h (struct it): New member dpvec_face_id.
	(merge_into_realized_face): Add prototype.

	* xfaces.c (merge_into_realized_face): New function.  Used to
	merge escape-glyph face or face from display table into current	face.

	* xdisp.c (Vshow_nonbreak_escape): New lisp var.
	(syms_of_xdisp): DEFVAR_LISP it.
	(escape_glyph_face): Remove var.
	(redisplay_window): Don't initialize it.
	(setup_for_ellipsis, get_next_display_element):
	Set it->dpvec_face_id to -1.
	(get_next_display_element): Test Vshow_nonbreak_escape.
	Do not setup escape_glyph_face.
	Properly merge escape-glyph face or face from display table with
705 706
	current face for escape and control characters.
	Set it->dpvec_face_id to relevant face id instead of adding it to each
Kim F. Storm's avatar
Kim F. Storm committed
707 708 709 710
	element of display vector.
	(next_element_from_display_vector): If it->dpvec_face_id is set,
	use that instead of lface_id from glyph itself.

711 712 713 714 715 716 717 718 719 720 721 722
2005-01-08  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xterm.h (struct x_output): New member, toolbar_detached.

	* gtkutil.c (xg_create_frame_widgets): Set initial tool bar height to
	38.
	(xg_tool_bar_detach_callback): Set toolbar_detached to 1.
	(xg_tool_bar_attach_callback): Set toolbar_detached to 0.
	(xg_create_tool_bar): Initialize toolbar_detached.
	(update_frame_tool_bar): Only set FRAME_TOOLBAR_HEIGHT (f) if
	toolbar_detached is zero.

723 724
2005-01-07  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

725 726 727
	* xmenu.c (create_and_show_popup_menu): Pass zero as button to
	gtk_menu_popup if not for_click, so callbacks for the menu are called.

728 729
	* gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar)
	(xg_tool_bar_callback, xg_tool_bar_help_callback)
730
	(update_frame_tool_bar): Cast to EMACS_INT to avoid compiler warning.
731 732

	* xselect.c (x_get_foreign_selection, x_fill_property_data)
Kim F. Storm's avatar
Kim F. Storm committed
733
	(Fx_get_atom_name, Fx_send_client_event): Replace XFLOAT with
734 735
	XFLOAT_DATA to get extract number from Lisp object.

Kim F. Storm's avatar
Kim F. Storm committed
736 737 738 739 740
2005-01-07  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (set_iterator_to_next): Fix 2004-12-13 change.
	Set stop_charpos to current charpos instead of 0.

741 742 743 744
2005-01-06  Nick Roberts  <nickrob@snap.net.nz>

	* xdisp.c (Fformat_mode_line): First arg now required.

745 746 747 748 749
2005-01-06  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* macterm.c (XLoadQueryFont): Correctly handle 0 size
	font widths that are returned from some Japanese fonts.

Kim F. Storm's avatar
Kim F. Storm committed
750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766
2005-01-06  Kim F. Storm  <storm@cua.dk>

	* fringe.c (fringe_faces): Change to Lisp_Object pointer.
	(draw_fringe_bitmap_1): Lookup user defined fringe faces here.
	(destroy_fringe_bitmap): Set fringe_faces element to nil.
	(Fdefine_fringe_bitmap, init_fringe): Change allocation of
	fringe_faces array and init elements to nil.
	(Fset_fringe_bitmap_face): Set fringe_faces to face name instead of
	non-persistent face id.
	(mark_fringe_data): New function for GC.

	* alloc.c (mark_fringe_data): Declare extern.
	(Fgarbage_collect): Call mark_fringe_data.

	* alloc.c (overrun_check_free): Invalidate freed memory if
	XMALLOC_CLEAR_FREE_MEMORY is defined.

Steven Tamm's avatar
Steven Tamm committed
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787
2005-01-05  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* 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.
788 789
	[TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise.
	Reject only when there are no filename items.  Set background color
Steven Tamm's avatar
Steven Tamm committed
790 791 792
	before (un)highlighting the window below the dragged items.
	(XTread_socket) [!USE_CARBON_EVENTS]: Don't call do_window_update.

Kenichi Handa's avatar
Kenichi Handa committed
793 794 795 796
2005-01-05  Romain Francoise  <romain@orebokech.com>

	* term.c (encode_terminal_code): Fix buffer size computation.

797 798 799 800
2005-01-04  Richard M. Stallman  <rms@gnu.org>

	* xdisp.c (Fformat_mode_line): Doc fix.

801 802 803 804 805 806
2005-01-04  Stefan Monnier  <monnier@iro.umontreal.ca>

	* alloc.c (refill_memory_reserve): Move.
	(emacs_blocked_free, emacs_blocked_malloc, emacs_blocked_realloc)
	(reset_malloc_hooks, uninterrupt_malloc) [SYNC_INPUT]: Don't define.

807 808 809 810 811
2005-01-03  Richard M. Stallman  <rms@gnu.org>

	* window.c (window_scroll_pixel_based): Don't correct preserve_y
	for CURRENT_HEADER_LINE_HEIGHT when moving backwards.

Jason Rumney's avatar
Jason Rumney committed
812 813 814 815 816 817 818 819 820 821 822 823 824
2005-01-03  Jason Rumney  <jasonr@gnu.org>

	* w32bdf.c (w32_load_bdf_font): Set fontp->average_width and
	fontp->space_width to FONT_WIDTH so they are valid.

	* w32fns.c (w32_load_system_font): Set FONT_WIDTH to maximum, not
	average width. Set fontp->average_width and fontp->space_width to
	their appropriate values.

	* w32term.c (x_new_font): Set FRAME_COLUMN_WIDTH to
	fontp->average_width, not FONT_WIDTH.  Set FRAME_SPACE_WIDTH to
	fontp->space_width.

825 826 827 828 829 830 831
2005-01-03  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* 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.

832 833 834 835
2005-01-02  Richard M. Stallman  <rms@gnu.org>

	* alloc.c (Fgarbage_collect): Don't truncate_undo_list on dead buffers.

836 837 838 839
2004-12-31  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xterm.c (handle_one_xevent): Clear area in expose event for GTK.

840 841
2004-12-31  Richard M. Stallman  <rms@gnu.org>

842 843 844 845 846 847 848 849 850 851 852 853 854
	* xdisp.c (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.

	* dispextern.h (struct it): New element ellipsis_p.
	(struct glyph_row): New element ends_in_ellipsis_p.

	* xdisp.c (BUFFER_POS_REACHED_P): We haven't reached the specified
	position if we're reading from something other than the buffer.

855 856 857 858
	* window.c (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.

859 860 861 862 863 864 865 866
2004-12-30  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (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.
Kim F. Storm's avatar
Kim F. Storm committed
867
	(syms_of_xdisp): Remove intern and staticpro for Qtotal.
868

Kenichi Handa's avatar
Kenichi Handa committed
869 870 871 872
2004-12-30  Kenichi Handa  <handa@m17n.org>

	* fileio.c (Finsert_file_contents): Don't use
	current_buffer->buffer_file_coding_system even if REPLACE is
873
	non-nil.  Call Qafter_insert_file_set_coding with the second arg VISIT.
Kenichi Handa's avatar
Kenichi Handa committed
874 875 876 877 878 879 880 881 882 883 884

	* fontset.h (struct font_info): New members space_width and
	average_width.

	* frame.h (struct frame): New member space_width.
	(FRAME_SPACE_WIDTH): New macro.

	* xterm.h (struct x_display_info): New member Xatom_AVERAGE_WIDTH.

	* xterm.c (x_new_font): Set FRAME_COLUMN_WIDTH to
	fontp->average_width, not FONT_WIDTH.  Set FRAME_SPACE_WIDTH to
Jason Rumney's avatar
Jason Rumney committed
885
	fontp->space_width.
886
	(x_load_font): Calculate fontp->space_width and fontp->average_width.
Kenichi Handa's avatar
Kenichi Handa committed
887 888 889 890 891
	(x_term_init): Initialize dpyinfo->Xatom_AVERAGE_WIDTH.

	* xdisp.c (x_produce_glyphs): Calculate tab width by
	FRAME_SPACE_WIDTH, not FRAME_COLUMN_WIDTH.

892 893 894
2004-12-29  Sanghyuk Suh  <han9kin@mac.com>

	* macterm.c (SelectionRange): Add Xcode position apple event struct.
895
	(do_ae_open_documents): Handle Xcode-style file position open events.
896

897 898 899 900
2004-12-29  Luc Teirlinck  <teirllm@auburn.edu>

	* buffer.c (syms_of_buffer) <vertical-scroll-bar>: Correct typo.

901 902 903 904
2004-12-29  Richard M. Stallman  <rms@gnu.org>

	* buffer.c (syms_of_buffer) <vertical-scroll-bar>: Doc fix.

905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920
2004-12-29  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* 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 reflect_byte.
	Lookup table instead.
	(mac_do_font_lists): Simplify calculation of the longest
	nonspecial string.
	(init_mac_drag_n_drop): Remove function	and declaration.
	(mac_initialize) [TARGET_API_MAC_CARBON]: Don't call
	init_mac_drag_n_drop.
	(mac_do_track_drag): New function and declaration.
	(install_window_handler): Return OSErr value.
921 922
	(install_window_handler) [TARGET_API_MAC_CARBON]:
	Register handlers for tracking/receiving drag-and-drop items.
923
	(do_ae_open_documents): Generate unibyte strings for filenames.
924 925
	(mac_do_receive_drag) [TARGET_API_MAC_CARBON] : Likewise.
	Reject only non-filename items.  Set event modifiers, and return value.
926

927 928 929 930
2004-12-28  Dan Nicolaescu  <dann@ics.uci.edu>

	* coding.c (decode_coding): Fix previous change.

931 932 933 934 935
2004-12-28  Richard M. Stallman  <rms@gnu.org>

	* xdisp.c (back_to_previous_visible_line_start):
	Don't call handle_display_prop.

936 937 938 939 940 941 942 943
2004-12-28  Dan Nicolaescu  <dann@ics.uci.edu>

	* coding.c (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.

944 945 946 947
2004-12-27  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xmenu.c (popup_get_selection): Only pop down dialogs
	on C-g and Escape.
948
	(popup_get_selection): Remove parameter down_on_keypress.
949 950
	(create_and_show_popup_menu, create_and_show_dialog):
	Remove parameter down_on_keypress to popup_get_selection.
951

952 953 954 955
2004-12-27  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* dispextern.h: Change HAVE_CARBON to MAC_OS.
	(struct glyph_string): Likewise.
Kim F. Storm's avatar
Kim F. Storm committed
956

957 958
	* emacs.c (main) [MAC_OS8]: Call mac_term_init instead of
	mac_initialize.
Kim F. Storm's avatar
Kim F. Storm committed
959

960 961
	* fileio.c (Fnext_read_file_uses_dialog_p, Fread_file_name):
	Change TARGET_API_MAC_CARBON to HAVE_CARBON.
Kim F. Storm's avatar
Kim F. Storm committed
962

963
	* fns.c (vector): Change MAC_OSX to MAC_OS.
Kim F. Storm's avatar
Kim F. Storm committed
964

965 966
	* frame.c (x_set_frame_parameters, x_report_frame_params)
	(x_set_fullscreen): Remove #ifndef HAVE_CARBON.
967 968
	(x_set_border_width, Vdefault_frame_scroll_bars):
	Change HAVE_CARBON to MAC_OS.
Kim F. Storm's avatar
Kim F. Storm committed
969

970 971 972
	* image.c [MAC_OS]: Include sys/stat.h.
	[MAC_OS && !MAC_OSX]: Include sys/param.h, ImageCompression.h, and
	QuickTimeComponents.h.
Kim F. Storm's avatar
Kim F. Storm committed
973

974 975
	* mac.c [!MAC_OSX] (mac_wait_next_event): Add extern.
	[!MAC_OSX] (select): Use mac_wait_next_event.
976
	[!MAC_OSX] (run_mac_command): Change EXEC_SUFFIXES to Vexec_suffixes.
977 978 979 980 981 982 983 984 985 986 987 988 989 990
	[!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.
Kim F. Storm's avatar
Kim F. Storm committed
991

992 993 994
	* macfns.c (mac_initialized): Remove extern.
	(stricmp): Put in #if 0.  All callers changed to use xstricmp in
	xfaces.c.
995 996
	(strnicmp): Decrement `n' at the end of each loop, not the beginning.
	(check_mac): Use the term "Mac native windows" instead of "Mac OS".
997 998 999 1000 1001
	(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.
1002 1003
	(Fx_create_frame): Use it instead of make_mac_frame.
	Set parameter for Qfullscreen.  Call x_wm_set_size_hint.
1004 1005
	(Fx_open_connection, Fx_close_connection): New defuns.
	(syms_of_macfns): Defsubr them.
1006 1007
	(x_create_tip_frame) [TARGET_API_MAC_CARBON]:
	Add kWindowNoUpdatesAttribute to the window attribute.
1008 1009 1010 1011 1012 1013 1014
	(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.
Kim F. Storm's avatar
Kim F. Storm committed
1015

1016
	* macgui.h [!MAC_OSX]: Don't include Controls.h.  Include Windows.h.
1017 1018 1019
	(Window): Typedef to WindowPtr and move outside `#if
	TARGET_API_MAC_CARBON'.
	(XSizeHints): New struct.
Kim F. Storm's avatar
Kim F. Storm committed
1020

1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034
	* 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.
1035
	(x_wm_set_size_hint): Allocate size_hints if needed.  Set size_hints.
1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048
	(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.
1049
	(do_grow_window): Set minimum height/width according to size_hints.
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060
	(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.
1061 1062 1063 1064
	(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.
1065 1066 1067 1068 1069 1070 1071 1072 1073
	(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.
Kim F. Storm's avatar
Kim F. Storm committed
1074 1075
	(syms_of_macterm) [!MAC_OSX]: Don't call Fprovide.

1076 1077 1078 1079
	* macterm.h (check_mac): Add extern.
	(struct mac_output): New member size_hints.
	(FRAME_SIZE_HINTS): New macro.
	(mac_unload_font): Add extern.
Kim F. Storm's avatar
Kim F. Storm committed
1080

1081
	* xdisp.c (expose_window, expose_frame): Remove kludges for Mac.
Kim F. Storm's avatar
Kim F. Storm committed
1082

1083 1084
	* xfaces.c (clear_font_table) [MAC_OS]: call mac_unload_font.

Richard M. Stallman's avatar
Richard M. Stallman committed
1085 1086
2004-12-27  Richard M. Stallman  <rms@gnu.org>

1087
	* buffer.c (Fbuffer_disable_undo): Delete (move to simple.el).
1088 1089 1090 1091 1092
	(syms_of_buffer): Don't defsubr it.

	* process.c (list_processes_1): Set undo_list instead
	of calling Fbuffer_disable_undo.

1093
	* xdisp.c (single_display_spec_string_p): Rename from
Richard M. Stallman's avatar
Richard M. Stallman committed
1094
	single_display_prop_string_p.
1095
	(single_display_spec_intangible_p): Rename from
Richard M. Stallman's avatar
Richard M. Stallman committed
1096
	single_display_prop_intangible_p.
1097
	(handle_single_display_spec): Rename from handle_single_display_prop.
Richard M. Stallman's avatar
Richard M. Stallman committed
1098 1099
	Rewritten to be easier to understand.

Kim F. Storm's avatar
Kim F. Storm committed
1100
	Change in load-history format.  Functions now get (defun . NAME),
Richard M. Stallman's avatar
Richard M. Stallman committed
1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111
	and variables get just NAME.

	* data.c (Fdefalias): Use (defun . FN_NAME) in LOADHIST_ATTACH.

	* eval.c (Fdefun, Fdefmacro): Use (defun . FN_NAME) in LOADHIST_ATTACH.
	(Fdefvaralias, Fdefvar, Fdefconst): Use just SYM in LOADHIST_ATTACH.
	(Qdefvar): Var deleted.
	(syms_of_eval): Don't initialze it.

	* lread.c (syms_of_lread) <load-history>: Doc fix.

1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126
2004-12-27  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xmenu.c (popup_get_selection): Pop down on C-g.
	(set_frame_menubar): Install translations for Lucid/Motif/Lesstif that
	pops down menu on C-g.
	(xdialog_show): If dialog popped down and no button in the dialog was
	pushed, call Fsignal to quit.
	(xmenu_show): In no toolkit version, if menu returns NO_SELECT call
	Fsignal to quit.

	* xfns.c (Fx_file_dialog): Motif/Lesstif version:  Pop down on C-g.

	* gtkutil.c (xg_initialize): Install bindings for C-g so that
	dialogs and menus pop down.

Kenichi Handa's avatar
Kenichi Handa committed
1127 1128 1129 1130
2004-12-27  Kenichi Handa  <handa@m17n.org>

	* coding.c (code_convert_region): Fix calculation of `ratio'.

1131 1132
2004-12-25  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

1133 1134 1135
	* gtkutil.c (update_frame_tool_bar): Make the value of
	tool-bar-button-margin control margins of images in tool bar.

1136 1137 1138 1139 1140 1141 1142
	* alloc.c (check_depth): New variable.
	(overrun_check_malloc, overrun_check_realloc): Only add
	overhead and write check pattern if check_depth is 1 (to handle
	recursive calls).  Increase/decrease check_depth in entry/exit.
	(overrun_check_free): Only check for overhead if check_depth is 1.
	Increase/decrease check_depth in entry/exit.

1143 1144 1145 1146 1147 1148
2004-12-23  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* keyboard.c (input_available_signal): Call SIGNAL_THREAD_CHECK
	before touching input_available_clear_time, to avoid accessing it
	from multiple threads.

1149 1150 1151 1152 1153
2004-12-23  Jason Rumney  <jasonr@gnu.org>

	* image.c (__WIN32__) [HAVE_NTGUI]: Define for correct behaviour
	of JPEG library.

1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164
2004-12-22  Richard M. Stallman  <rms@gnu.org>

	* emacs.c (main): If batch mode, set Vundo_outer_limit to nil.

	* lisp.h (Vundo_outer_limit): Fix decl.

	* undo.c (Vundo_outer_limit): Replaces undo_outer_limit.
	Uses changed.
	(syms_of_undo): Initialize appropriately.
	(truncate_undo_list): If it's nil, there's no limit.

Kenichi Handa's avatar
Kenichi Handa committed
1165 1166 1167 1168
2004-12-22  Kenichi Handa  <handa@m17n.org>

	* xselect.c (Fx_get_cut_buffer_internal): Return a unibyte string.

1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180
2004-12-21  Richard M. Stallman  <rms@gnu.org>

	* eval.c (unwind_to_catch): Clear immediate_quit.

	* xdisp.c (get_next_display_element): Display codes 8a0 and 8ad
	specially as `\ ' and `\-'.

	* keyboard.c (kbd_buffer_store_event_hold):
	In the code for while-no-input, handle immediate_quit.

	* alloc.c (Fgarbage_collect): Update call to truncate_undo_list.
	Call that at the very start.
1181
	(undo_limit, undo_strong_limit, undo_outer_limit): Move to undo.c.
1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204
	(syms_of_alloc): Don't define undo-limit,
	undo-strong-limit and undo-outer-limit here.

	* undo.c (truncate_undo_list): Return void.
	Take just one argument, the buffer.
	Make it current, and inhibit recursive GC.
	Access and update the undo list directly; return void.
	Refer to the undo...limit variables directly.
	Test undo_outer_limit only after counting the whole current command.
	When it's exceeded, call the function in undo-outer-limit-function.
	(undo_limit, undo_strong_limit, undo_outer_limit): From alloc.c.
	(Vundo_outer_limit_function): New variable.
	(syms_of_undo): Define undo-limit, undo-strong-limit
	and undo-outer-limit here, and undo-outer-limit-function.
	Doc fixes.

	* lisp.h (truncate_undo_list): Update decl.

2004-12-21  Piet van Oostrum  <piet@cs.uu.nl>

	* fileio.c (Fread_file_name): Delete duplicates in
	file-name-history when history_delete_duplicates is true.

1205 1206 1207 1208
2004-12-20  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* macterm.c (mac_do_list_fonts): Fix memory leak

1209 1210 1211 1212 1213
2004-12-20  Richard M. Stallman  <rms@gnu.org>

	* regex.c (re_match_2_internal) <symend, wordend>:
	Fix calls to UPDATE_SYNTAX_TABLE_FORWARD.

1214 1215
2004-12-18  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

1216 1217
	* macterm.c (endif, x_font_name_to_mac_font_name):
	Use maccentraleurroman instead of maccentraleuropean
1218 1219 1220
	(mac_c_string_match, mac_do_list_fonts): Speed up font search by
	quickly finding a specific font without needing regexps.

1221 1222
2004-12-15  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242
	* syssignal.h: Declare main_thread.
	(SIGNAL_THREAD_CHECK): New macro.

	* keyboard.c (input_available_signal): Move thread checking code
	to macro SIGNAL_THREAD_CHECK and call that macro.
	(interrupt_signal): Call SIGNAL_THREAD_CHECK.

	* alloc.c (uninterrupt_malloc): Move main_thread to emacs.c.

	* emacs.c: Define main_thread.
	(main): Initialize main_thread.
	(handle_USR1_signal, handle_USR2_signal, fatal_error_signal)
	(memory_warning_signal): Call SIGNAL_THREAD_CHECK.

	* floatfns.c (float_error): Call SIGNAL_THREAD_CHECK.

	* dispnew.c (window_change_signal): Call SIGNAL_THREAD_CHECK.

	* sysdep.c (select_alarm): Call SIGNAL_THREAD_CHECK.

1243 1244
	* process.c (send_process_trap, sigchld_handler):
	Call SIGNAL_THREAD_CHECK.
1245 1246 1247 1248 1249

	* data.c (arith_error): Call SIGNAL_THREAD_CHECK.

	* atimer.c (alarm_signal_handler): Call SIGNAL_THREAD_CHECK.

1250 1251 1252
	* xterm.c (xg_scroll_callback): Update XG_LAST_SB_DATA before
	returning when xg_ignore_gtk_scrollbar is true.

1253 1254 1255 1256 1257
2004-12-14  Kim F. Storm  <storm@cua.dk>

	* keyboard.c (read_char): Save and restore echo_string when
	handling input method.

1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268
2004-12-13  Richard M. Stallman  <rms@gnu.org>

	* eval.c (syms_of_eval) <quit-flag>: Doc fix.

	* keyboard.c (Vthrow_on_input): New variable.
	(syms_of_keyboard): Defvar and initialize it.
	(kbd_buffer_store_event_hold): Handle Vthrow_on_input.

	* lisp.h (QUIT): Check for Vthrow_on_input.
	(Vthrow_on_input): Declare it.

Kim F. Storm's avatar
Kim F. Storm committed
1269 1270 1271 1272 1273
2004-12-13  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (set_iterator_to_next): Reset stop_charpos after display
	vector.

1274 1275 1276 1277 1278 1279 1280
2004-12-12  Richard M. Stallman  <rms@gnu.org>

	* indent.c (Fvertical_motion): Call move_it_by_lines even if LINES = 0.

	* minibuf.c (Fall_completions): Add var `zero' and use it in loop.
	(Ftry_completion): Really use outer `zero'; eliminate inner one.

1281 1282 1283 1284
2004-12-12  Kenichi Handa  <handa@m17n.org>

	* term.c (encode_terminal_code): Fix previous change.

Stefan Monnier's avatar
Stefan Monnier committed
1285 1286
2004-12-11  Stefan Monnier  <monnier@iro.umontreal.ca>

Stefan Monnier's avatar
Stefan Monnier committed
1287 1288 1289
	* keyboard.c (handle_async_input): Remove pthread mutex handling.
	(input_available_signal): Move pthread thingy to !SYNC_INPUT branch.

Stefan Monnier's avatar
Stefan Monnier committed
1290 1291 1292 1293 1294 1295 1296 1297
	* syntax.c (Fforward_word): Avoid non-idempotent side-effects
	in macro arguments.

	* minibuf.c (Ftry_completion, Fall_completions): Don't use
	XFASTINT blindly.

	* emacs.c (main, Fdump_emacs): Don't touch malloc hooks if SYNC_INPUT.

1298 1299
2004-12-11  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

1300 1301 1302 1303
	* w32term.c (x_calc_absolute_position): Remove calculation of
	difference between inner and outer window.  Don't subtract difference
	for left and top calculations.

1304 1305
	* xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff
	for left and top calculations.  Remove call to x_real_positions.
1306
	[Bug report by Drew Adams in November]
1307 1308 1309
	(x_check_expected_move): Do not set change_gravity to 1 when calling
	x_set_offset.

1310 1311 1312 1313 1314 1315 1316 1317 1318
2004-12-08  Richard M. Stallman  <rms@gnu.org>

	* xdisp.c (get_next_display_element): Use `escape-glyph' for
	control chars and escaped octal codes.
	(Qescape_glyph): New variable.
	(syms_of_xdisp): Initialize it.
	(escape_glyph_face): New variable.
	(redisplay_window): Initialize it.

1319 1320 1321 1322 1323
2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>

	* image.c (our_fill_input_buffer, jpeg_load, CHECK_LIB_AVAILABLE)
	(init_image): Use 1 rather than TRUE.  TRUE's not always defined.

1324 1325
2004-12-07  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

1326 1327 1328
	* emacs.c (Fdump_emacs): Add ! defined (SYSTEM_MALLOC) around
	reset_malloc_hooks.

Stefan Monnier's avatar
Stefan Monnier committed
1329 1330
	* keyboard.c (handle_async_input, input_available_signal):
	Add ! defined (SYSTEM_MALLOC) around thread code.
1331

1332 1333
	* alloc.c: Add comment about the reason for (UN)BLOCK_INPUT_ALLOC.

1334
2004-12-07  Stefan Monnier  <monnier@iro.umontreal.ca>
Stefan Monnier's avatar
Stefan Monnier committed
1335 1336 1337 1338 1339

	* eval.c (init_eval_once): Increase max_specpdl_size to 1000.

	* config.in: Regenerate.

1340 1341
2004-12-07  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

1342 1343 1344 1345 1346
	* xmenu.c (Fx_popup_menu): Correct documentation about position.
	(xmenu_show): Do not call XTranslateCoordinates.  Adjust position
	if not given by a mouse click to correspond with x-popup-menu
	documentation.

Jan Djärv's avatar
Jan Djärv committed
1347 1348
	* config.in: Regenerate.

1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367
	* gtkutil.c: Include signal.h and syssignal.h.
	(xg_get_file_name): Block and unblock __SIGRTMIN if defined.

	* alloc.c: If HAVE_GTK_AND_PTHREAD, include pthread.h,
	new variables main_thread and alloc_mutex,
	define (UN)BLOCK_INPUT_ALLOC to use alloc_mutex to protect
	emacs_blocked_* calls and only do (UN)BLOCK_INPUT in the main thread.
	If not HAVE_GTK_AND_PTHREAD, (UN)BLOCK_INPUT_ALLOC is the same as
	(UN)BLOCK_INPUT.
	(emacs_blocked_free, emacs_blocked_malloc)
	(emacs_blocked_realloc): Use (UN)BLOCK_INPUT_ALLOC.
	(uninterrupt_malloc): Initialize main_thread and alloc_mutex.
	(reset_malloc_hooks): New function.

	* lisp.h: Declare reset_malloc_hooks.

	* emacs.c (Fdump_emacs): Call reset_malloc_hooks.

	* keyboard.c: Conditionally include pthread.h
Stefan Monnier's avatar
Stefan Monnier committed
1368
	(handle_async_input, input_available_signalt): If not in the main