ChangeLog 384 KB
Newer Older
1 2 3 4 5 6
2003-10-12  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* window.c (shrink_windows): New function.
	(size_window): Call shrink_windows to calculate window sizes when
	shrinking frame with more than one window.

Kim F. Storm's avatar
Kim F. Storm committed
7 8 9 10
2003-10-12  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (compute_fringe_widths): Doc fix.

11 12 13 14 15
2003-10-08  Kenichi Handa  <handa@m17n.org>

	* coding.c (Fcoding_system_p): Return t for auto-loading coding
	system.

Kenichi Handa's avatar
Kenichi Handa committed
16 17 18 19 20 21 22
2003-10-07  Kenichi Handa  <handa@m17n.org>

	* coding.c (Qcoding_system_define_form): New variable.
	(syms_of_coding): Intern and staticpro it.
	(Fcheck_coding_system): Try to autoload the definition of
	CODING-SYSTEM.

Luc Teirlinck's avatar
Luc Teirlinck committed
23 24 25 26
2003-10-05  Luc Teirlinck  <teirllm@auburn.edu>

	* fns.c (Frequire): Doc fix.

27 28
2003-10-05  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

29 30
	* xfns.c (Fx_send_client_event): New function as a base for
	manipulating extended window manager hints.
31
	(Fx_send_client_event): Remove unused variable s.
32

33 34 35 36 37 38 39 40 41 42 43 44 45 46
	* w32term.c (w32_read_socket): Remove call to x_check_fullscreen_move,
	that function is removed.

	* xterm.c (x_set_offset): Use move_offset_left/top instead of
	x/y_pixels_outer_diff.
	(x_check_expected_move): Calculate move_offset_left/top.

	* xterm.h (struct x_output): New members: move_offset_top/left.

	* frame.c (x_set_frame_parameters): x_fullscreen_move removed,
	call x_set_offset directly.

	* frame.h (enum): FULLSCREEN_MOVE_WAIT removed.

47 48 49 50 51 52 53 54
	* frame.c (Fdelete_frame): Free decode_mode_spec_buffer.

	* xterm.c (x_delete_display): Free font names and font_encoder
	in dpyinfo->font_table.

	* xfns.c (Fx_close_connection): Only call XFreeFont here.  xfree
	of font names moved to x_delete_display.

55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
	* xterm.h (struct x_display_info): New member, wm_type.
	(struct x_output): New members, expected_top/left and
	check_expected_move.

	* xterm.c (handle_one_xevent): Reset wm_type when ReparentNotify
	is received.
	(handle_one_xevent): x_check_expected_move renamed from
	x_check_fullscreen_move
	(x_set_offset): Only add WM decoration sizes to	modified_top/left
	for X_WMTYPE_A.  Set check_expected_move when WM type is unknown.
	(x_check_expected_move): Renamed from x_check_fullscreen_move.
	Removed fullscreen specific code.  Use check_expected_move,
	expected_left/top instead.  Also, set wm_type.
	(x_term_init): Initialize wm_type to unknown.

	* frame.c (x_fullscreen_move): Remove addition of WM decoration
	sizes to move_x/y.

73 74 75 76 77 78 79 80 81 82 83 84 85 86
2003-10-03  Kenichi Handa  <handa@m17n.org>

	* macterm.c (x_load_font): Clear all members of FONTP before start
	filling them.

2003-10-02  Kenichi Handa  <handa@m17n.org>

	* fontset.c (fs_load_font): Don't set fontp->font_encoder to NULL
	before calling find_ccl_program_func.  Call find_ccl_program_func
	only when fontp->font_encoder is not NULL.

	* xterm.c (x_load_font): Clear all members of FONTP before start
	filling them.

87 88 89 90
2003-10-03  John Paul Wallington  <jpw@gnu.org>

	* keymap.c (map_keymap): Don't abort when binding is a vector.

91 92
2003-10-02  Jason Rumney  <jasonr@gnu.org>

93 94 95 96
	* makefile.w32-in (emacs.o, coding.o, bytecode.o): Sync
	dependancies with Makefile.in.
	(alloca.o): Remove.

97 98 99 100 101
	* w32fns.c (w32_load_system_font): Clear all members of FONTP before
	filling them.

	* w32bdf.c (w32_load_bdf_font): Likewise.

102 103 104 105 106 107 108 109 110 111 112 113 114
2003-09-30  Richard M. Stallman  <rms@gnu.org>

	* term.c (set_tty_color_mode): Calculate current_mode_spec
	regardless of value of VAL.

	* intervals.c (graft_intervals_into_buffer): 
	Set BUF_INTERVALS (buffer)->up_obj when appropriate.
	Handle over_used when splitting UNDER.

2003-09-30  YAMAMOTO  Mitsuharu <mituharu@math.s.chiba-u.ac.jp>

	* regex.c (regex_compile): Free the stack when returning from function.

Kenichi Handa's avatar
Kenichi Handa committed
115 116 117 118 119
2003-09-28  Kenichi Handa  <handa@m17n.org>

	* fontset.c (Finternal_char_font): Change return value to
	cons (FONT-NAME . GLYPH-CODE).

120 121 122 123
2003-09-28  Eli Zaretskii  <eliz@elta.co.il>

	* term.c (tty_setup_colors): Treat any negative argument as -1.

Kenichi Handa's avatar
Kenichi Handa committed
124 125 126 127
2003-09-27  Gaute B Strokkenes  <biggaute@uwc.net>  (tiny change)

	* process.c (send_process): Delete unused temp_buf.

Dave Love's avatar
Dave Love committed
128 129 130 131
2003-09-26  Dave Love  <fx@gnu.org>

	* xterm.c (x_bitmap_mask): Declare.

Dave Love's avatar
Dave Love committed
132 133 134 135
2003-09-25  Dave Love  <fx@gnu.org>

	* Makefile.in (fns.o): Depend on md5.h.

Kim F. Storm's avatar
Kim F. Storm committed
136 137 138 139 140
2003-09-25  Kim F. Storm  <storm@cua.dk>

	* window.c (set_window_buffer): Fix redisplay problems when
	switching between buffers with different display margin widths.

Kim F. Storm's avatar
Kim F. Storm committed
141 142 143 144 145 146 147
2003-09-23  Kim F. Storm  <storm@cua.dk>

	* process.c (set_socket_option): Fix :bindtodevice option.
	(Fset_network_process_option): Update process contact list when
	setting option succeeds.
	(Fmake_network_process): Doc fix.

Dave Love's avatar
Dave Love committed
148 149
2003-09-23  Dave Love  <fx@gnu.org>

Stefan Monnier's avatar
Stefan Monnier committed
150
	* process.c (Fnetwork_interface_info): Use HAVE_STRUCT_IFREQ... macros.
Dave Love's avatar
Dave Love committed
151

Eli Zaretskii's avatar
Eli Zaretskii committed
152 153 154 155 156
2003-09-22  Eli Zaretskii  <eliz@elta.co.il>

	* term.c (set_tty_color_mode): Use INTEGERP to test whether a
	color mode is an integer number (it could be -1).

157 158 159 160 161
2003-09-22  Richard M. Stallman  <rms@gnu.org>

	* intervals.c (graft_intervals_into_buffer): Correct the main loop
	in the case where OVER is longer than UNDER.

162 163
2003-09-22  Masatake YAMATO  <jet@gyve.org>

Stefan Monnier's avatar
Stefan Monnier committed
164
	* window.c (Fset_window_scroll_bars): Validate the value of
165
	`vertical_type'.
Stefan Monnier's avatar
Stefan Monnier committed
166

167 168 169 170 171 172 173
2003-09-21  Kim F. Storm  <storm@cua.dk>

	* frame.c (Vdefault_frame_scroll_bars): New variable.
	(x_set_vertical_scroll_bars): Use it instead of hardcoded values.
	(syms_of_frame): DEFVAR_LISP it, and initialize according to
	window-system default scroll bar position.

Kim F. Storm's avatar
Kim F. Storm committed
174 175
	* window.c (Fwindow_scroll_bars): Doc fix.

176 177 178 179 180
2003-09-19  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xterm.c (x_set_offset): Take window manager decorations
	into account.

181 182 183 184 185 186 187 188 189 190 191 192
2003-09-19  Richard M. Stallman  <rms@gnu.org>

	* atimer.h: Don't include lisp.h.
	(P_): Define it here (as well as elsewhere).

	* print.c (Fprin1_to_string): Move the PRINTPREPARE
	later, so that PRINTFINISH won't unbind Qinhibit_modification_hooks.

	* data.c (Fvariable_binding_locus): New function.
	(syms_of_data): defsubr it.
	(Flocal_variable_p): Delete duplicate call to indirect_variable.

193 194
2003-09-18  Dave Love  <fx@gnu.org>

195 196
	* alloc.c (GC_MALLOC_CHECK): Move conditional undef after lisp.h.

197 198 199 200
	* process.c (Fnetwork_interface_info): Fix type error.
	(Fnetwork_interface_list): Doc fix.
	(read_process_output, read_process_output): Delete unused var.

201 202 203 204 205 206 207 208 209 210
2003-09-17  Kim F. Storm  <storm@cua.dk>

	* process.c (Fnetwork_interface_list, Fnetwork_interface_info):
	Require HAVE_NET_IF_H and HAVE_SYS_IOCTL_H to include these fns.
	(Fnetwork_interface_info): Check that ifreq struct has required
	fields before accessing them; this requires that those fields are
	defined as macros, which may be too restrictive on some platforms,
	but it is better than failing on other platforms.
	(syms_of_process): Only defsubr above fns when included.

Dave Love's avatar
Dave Love committed
211 212 213 214
2003-09-17  Dave Love  <fx@gnu.org>

	* unexalpha.c: Don't include varargs.h.

Kim F. Storm's avatar
Kim F. Storm committed
215 216 217 218 219 220 221 222 223
2003-09-17  Kim F. Storm  <storm@cua.dk>

	* process.c (Fset_process_sentinel): Add sentinel to childp plist
	for network process.
	(socket_options): Add `:' prefix to option names.  Add optbit field.
	(set_socket_option): Remove no_error arg and special handling of s < 0.
	Return 1<<optbit for known option, 0 for unknown.
	Do not interpret 0 as false for boolean option (only nil).
	Pass failed option and value to report_file_error.
Stefan Monnier's avatar
Stefan Monnier committed
224
	(Fset_network_process_options): Replace by Fset_network_process_option.
Kim F. Storm's avatar
Kim F. Storm committed
225 226 227 228 229 230 231 232 233 234 235 236 237
	(Fset_network_process_option): New function to set just one option.
	(Fmake_network_process): Allow :coding arg to be a cons.
	Allow :server arg to be an integer specifying backlog size.
	Remove :options arg, and allow options to be specified directly
	as :KEY, VALUE pairs.  Parse these options before binding socket.
	As before, :reuseaddr t is default for a server process, but this
	can now be disabled by specifying :reuseaddr nil.
	(Fnetwork_interface_info): Rename from Fget_network_interface_info.
	(init_process): Availability of network options is now checked with
	simpler syntax (featurep 'make-network-process :OPTION); use loop to
	setup features.
	(syms_of_process): Fix defsubr's for the replaced functions.

Dave Love's avatar
Dave Love committed
238 239 240 241
2003-09-16  Dave Love  <fx@gnu.org>

	* Makefile.in: Depend on coding.h.

Kim F. Storm's avatar
Kim F. Storm committed
242 243 244 245 246 247 248
2003-09-14  Kim F. Storm  <storm@cua.dk>

	* process.c [HAVE_SOCKETS]: Include sys/ioctl.h and net/if.h.
	(Fnetwork_interface_list, Fget_network_interface_info): New defuns.
	(syms_of_process): Defsubr them.

	* config.in: Regenerate.
Stefan Monnier's avatar
Stefan Monnier committed
249 250 251 252 253 254 255 256 257 258

2003-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>

	* m/sr2k.h (XMARKBIT, XUNMARK): Remove.
	* m/news-r6.h (XUNMARK): Remove.
	* m/mips.h (XUNMARK): Remove.
	* m/mips-siemens.h (XUNMARK): Remove.
	* m/iris4d.h (XUNMARK): Remove.
	* m/hp800.h (XMARKBIT, XUNMARK): Remove.

259 260
2003-09-11  Stefan Monnier  <monnier@iro.umontreal.ca>

261 262 263 264 265 266
	* lisp.h (VALBITS): Don't remove 1 for the markbit.
	(union Lisp_Object): Use unsigned int for types.  Remove markbit.
	(MARKBIT): Remove 1 from VALBITS so we still use same old val.
	(XTYPE): Use unsigned right-shift.
	(XMARKBIT, XMARK, XUNMARK): Remove.

267 268 269 270 271 272
	* alloc.c (init_intervals, init_symbol, init_marker):
	Don't preallocate anything.
	(Fgarbage_collect, mark_object): Ignore the markbit.

	* bytecode.c (mark_byte_stack, unmark_byte_stack): Ignore the markbit.

Lute Kamstra's avatar
Lute Kamstra committed
273
2003-09-08  Lute Kamstra  <lute@gnu.org>
Lute Kamstra's avatar
Lute Kamstra committed
274 275 276 277 278 279

	* xdisp.c (pint2hrstr): New function.
	(decode_mode_spec): Add `%i' and `%I' specs.
	* buffer.c (syms_of_buffer): Document `%i' and `%I' constructs
	for `mode-line-format'.

280 281 282 283 284
2003-09-07  Andreas Schwab  <schwab@suse.de>

	* alloc.c: Use long instead of int when casting ABLOCKS_BUSY to
	avoid warning.

285 286
2003-09-07  Eli Zaretskii  <eliz@elta.co.il>

287
	* editfns.c (region_limit): Support any non-zero value of BEGINNINGP.
288

Kim F. Storm's avatar
Kim F. Storm committed
289 290 291 292 293 294
2003-09-03  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (get_window_cursor_type): Partially undo 2002-03-01
	change (superseded by 2002-08-30 change); the default blink-off
	cursor is now again "no cursor".

Jason Rumney's avatar
Jason Rumney committed
295 296 297 298 299 300
2003-09-01  Jason Rumney  <jasonr@gnu.org>

	* makefile.w32-in (alloca.o): Remove.
	(coding.o): Depend on intervals.h
	(emacs.o, bytecode.o): Depend on window.h

Dave Love's avatar
Dave Love committed
301 302 303 304 305 306 307 308
2003-09-01  Dave Love  <fx@gnu.org>

	* Makefile.in (alloca.o): Remove commands.
	(coding.o): Depend on intervals.h composite.h window.h.
	(emacs.o): Depend on window.h keyboard.h keymap.h.
	(gtkutil.o): Depend on keyboard.h charset.h coding.h.
	(bytecode.o): Depend on window.h.

309 310
2003-08-31  Jason Rumney  <jasonr@gnu.org>

311 312 313
	* w32term.c (w32_per_char_metric): Allow cached metrics to be
	returned even when font_type is unknown.

314 315
	* xdisp.c (init_iterator): Remove old WINDOWSNT conditional.

316 317 318 319 320 321 322 323 324 325
2003-08-30  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xterm.c (x_term_init): Initialize new fields in x_display_info.

	* xterm.h (struct x_display_info): Add red/green/blue_bits and
	*_offset.

	* xfns.c (lookup_rgb_color): Use new fields in x_display_info to
	calculate pixel value.

326 327
2003-08-29  Gerd Moellmann  <gerd.moellmann@t-online.de>

328 329 330
	* xdisp.c (redisplay_internal): Fix change of 2003-04-30.
	Don't tell redisplay display is accurate when it's actually been
	paused for pending input.
331

332 333 334 335 336 337 338
2003-08-29  Richard M. Stallman  <rms@gnu.org>

	* dispnew.c (adjust_glyph_matrix): Call window_box
	whenever W is nonzero.

	* data.c (Fmake_variable_buffer_local, Fmake_local_variable)
	(Fkill_local_variable, Fmake_variable_frame_local)
339
	(Flocal_variable_p, Flocal_variable_if_set_p):
340 341 342 343 344 345 346 347 348 349
	Use indirect_variable to trace thru variable aliases.

	* config.in: Updated.

	* callint.c (Fcall_interactively): Save and restore
	Vthis_command, Vthis_original_command, real_this_command,
	and current_kboard->Vlast_command.

	* abbrev.c (Fexpand_abbrev): Insert before deleting.

350 351 352 353
2003-08-29  Gerd Moellmann  <gerd@gnu.org>

	* xfns.c (lookup_rgb_color): Handle TrueColor visuals specially.

354 355
2003-08-28  David Abrahams  <dave@boost-consulting.com>  (tiny change)

356
	* coding.c (decode_coding_iso2022): Initialize local variable c2.
357 358
	(decode_coding_sjis_big5): Likewise.

Jason Rumney's avatar
Jason Rumney committed
359 360
2003-08-27  Jason Rumney  <jasonr@gnu.org>

Jason Rumney's avatar
Jason Rumney committed
361 362
	* w32.c (sys_pipe): Protect against file descriptor overflow.

363 364
	* w32fns.c (syms_of_w32fns): Remove non-existent functions.

Jason Rumney's avatar
Jason Rumney committed
365 366
	* w32term.c (w32_read_socket): Fix WM_MOUSEWHEEL assignment.

Lute Kamstra's avatar
Lute Kamstra committed
367 368 369 370 371
2003-08-26  Terje Rosten <terjeros@phys.ntnu.no>

	* xfns.c (Vgtk_version_string): New variable.
	(syms_of_xfns): DEFVAR_LISP it.  Provide gtk.

Eli Zaretskii's avatar
Eli Zaretskii committed
372 373
2003-08-24  Eli Zaretskii  <eliz@elta.co.il>

374
	* term.c (term_init): Remove `const' from buffer_size's declaration.
Eli Zaretskii's avatar
Eli Zaretskii committed
375

Eli Zaretskii's avatar
Eli Zaretskii committed
376 377
	* Makefile.in (msdos.o): Depend on intervals.h.

378
	* msdos.c: Include intervals.h, since STRING_INTERVALS requires that.
Eli Zaretskii's avatar
Eli Zaretskii committed
379

380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395
2003-08-21  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xterm.h (struct x_display_info): New fields: client_leader_window
	and Xatom_wm_client_leader.

	* xterm.c (x_initialize): Move call to x_session_initialize to ...
	(x_term_init): ... here.  Initialize client_leader fields in dpyinfo.

	* xsmfns.c (create_client_leader_window): New function.
	(x_session_initialize): Call create_client_leader_window, take
	dpyinfo as argument.

	* xfns.c (Fx_create_frame): Set property WM_CLIENT_LEADER.

	* Makefile.in (xsmfns.o): Add more depenedencies.

Dave Love's avatar
Dave Love committed
396 397 398 399
2003-08-21  Dave Love  <fx@gnu.org>

	* m/iris4d.h: Use _MIPS_SZLONG, not _LP64.

400 401 402 403 404
2003-08-21  Kenichi Handa  <handa@m17n.org>

	* term.c (term_init): Fix previous change; don't rely on the
	length of `buffer' if TERMINFO is defined.

Dave Love's avatar
Dave Love committed
405 406 407 408 409 410 411 412 413 414 415 416 417
2003-08-20  Dave Love  <fx@gnu.org>

	* atimer.h: Include lisp.h.

	* lisp.h (EMACS_LISP_H): New.
	(popup_activated_flag): Don't declare.

	* alloca.c: Some merging with gnulib.  Change logic and doc
	concerning (x)malloc/(x)free -- no longer Emacs-specific.
	[DO_BLOCK_INPUT]: Don't include lisp.h.
	(xmalloc, xfree): Declare.
	(malloc): Don't declare.

418
	* Makefile.in (LWLIB_OPTIONS): Remove (unused).
Dave Love's avatar
Dave Love committed
419 420 421 422 423 424 425
	(alloca.o): Remove obsolete stuff concerning alloca.s.  Depend on
	atimer.h, blockinput.h.

	* alloc.c (lisp_align_malloc): Change type of `aligned'.

	* alloca.s: Removed.

426 427 428 429 430 431 432 433 434
2003-08-19  Gerd Moellmann  <gerd@gnu.org>

	* s/freebsd.h [__FreeBSD_version >= 400000]: Define TERMINFO,
	use -lncurses.

	* term.c (term_init): Use a buffer of size 4096 for tgetent since
	FreeBSD returns something longer than 2044.  Abort if the end of
	the buffer is overwritten.

435 436 437 438
2003-08-19  Miles Bader  <miles@gnu.org>

	* xterm.c (x_term_init): Correctly use result of Ffile_readable_p.

439 440
2003-08-19  Gerd Moellmann  <gerd@gnu.org>

441 442 443 444 445 446
	* alloc.c (lisp_align_malloc): Check for memory full when
	allocating ablocks, which also avoids freeing a pointer into an
	ablocks structure.

	* puresize.h (BASE_PURESIZE): Increase to 1100000.

447
	* buffer.c (Fmove_overlay): Set overlay's next pointer unconditionally.
448

449 450 451 452 453 454 455 456 457 458 459 460
2003-08-16  Richard M. Stallman  <rms@gnu.org>

	* editfns.c (Fencode_time): Doc fix.

2003-08-16  David Ponce  <david@dponce.com>

	* fileio.c (Fwrite_region): Fix conditional expression to issue
	the right message.

2003-08-16  Juri Linkov  <juri@jurta.org>  (tiny change)

	* syntax.c (Fforward_word): Argument changed to optional.
461
	Set default value to 1.
462

Kenichi Handa's avatar
Kenichi Handa committed
463 464 465 466 467 468 469 470 471
2003-08-15  Kenichi Handa  <handa@m17n.org>

	* xfaces.c (better_font_p): Prefer a real scalable font; i.e. not
	what autoscaled.
	(best_matching_font): Once we find a better scalable font, set
	non_scalable_has_exact_height_p to 1.
	(try_font_list): Call try_alternative_families to try any family
	with the given registry.

472 473
2003-08-09  Andreas Schwab  <schwab@suse.de>

474 475
	* alloc.c (mark_object): Handle Lisp_Misc_Save_Value.

476 477 478
	* print.c (print_string): Fix printing of multibyte string with
	nontrivial printcharfun.

479 480 481 482 483 484
2003-07-31  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* xfns.c (xg_set_icon): Rewrite to compile with GTK 2.0 and 2.2.

	* xterm.c (x_bitmap_icon): Return if xg_set_icon succeeds.

485 486 487 488 489
2003-07-31  Kenichi Handa  <handa@m17n.org>

	* process.c (read_process_output): Return the actually read bytes
	instead of the result of decoding.

490 491 492 493 494 495 496 497 498 499 500
2003-07-31  Kenichi Handa  <handa@m17n.org>

	* xterm.h (struct x_bitmap_record): New member have_mask.

	* xfns.c (x_create_bitmap_from_data): Initialize have_mask member
	to 0.
	(x_create_bitmap_from_file): Likewise.
	(x_destroy_bitmap): Check have_mask member before freeing a mask.
	(x_destroy_all_bitmaps): Likewise.
	(x_create_bitmap_mask): Set have_mask member to 1.

501 502 503 504
2003-07-30  Richard M. Stallman  <rms@gnu.org>

	* Makefile.in (CFLAGS) [!OPTIMIZE]: Undo previous change.

505 506 507 508
2003-07-29  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* gtkutil.c (xg_mark_data): Update calls to mark_object.

509 510 511 512 513 514 515 516
2003-07-29  Richard M. Stallman  <rms@gnu.org>

	* xterm.c (xim_open_dpy, xim_initialize, xim_close_dpy):
	Conditionalize XIM code on HAVE_XIM.

	* fns.c (Fclear_string): New function.
	(syms_of_fns): defsubr it.

517 518
2003-07-28  KOBAYASHI Yasuhiro  <kobayays@otsukakj.co.jp> (tiny change)

519
	* xfns.c (xic_set_preeditarea): Add the left fringe width to spot.x.
520

521 522 523 524 525 526 527 528 529 530 531
2003-07-22  Stefan Monnier  <monnier@cs.yale.edu>

	* xfns.c: Don't check HAVE_PNG_H: autoconf doesn't seem to find it.

	* buffer.c (delete_all_overlays): New function.
	* buffer.h (delete_all_overlays): Declare.
	* coding.c (run_pre_post_conversion_on_str):
	* print.c (temp_output_buffer_setup):
	* fileio.c (Finsert_file_contents):
	* minibuf.c (get_minibuffer): Use it.

532 533 534 535 536 537
2003-07-22  Andrew Choi  <akochoi@shaw.ca>

	* unexmacosx.c (unexec_regions_sort_compare):
	(unexec_regions_merge): New functions.  Sort and merge unexec
	regions before dumping them.

Dave Love's avatar
Dave Love committed
538 539 540 541
2003-07-22  Dave Love  <fx@gnu.org>

	* xfns.c [HAVE_PNG]: Consider both png.h and libpng/png.h.

542 543 544 545 546 547
2003-07-21  Stefan Monnier  <monnier@cs.yale.edu>

	* alloc.c (MARK_STRING, UNMARK_STRING, STRING_MARKED_P)
	(GC_STRING_CHARS, string_bytes): Use ARRAY_MARK_FLAG rather than
	MARKBIT as the gcmarkbit for strings.

548 549 550 551
2003-07-21  Richard M. Stallman  <rms@gnu.org>

	* s/openbsd.h (LD_SWITCH_SYSTEM_TEMACS): Add undef.

552
	* fns.c (Flocale_info): Rename from Flanginfo.  Doc fixes.
553 554 555 556 557 558 559 560
	(syms_of_fns): Corresponding change.

	* alloc.c (syms_of_alloc): Doc fixes.

2003-07-20  Han Boetes  <han@mijncomputer.nl>  (tiny change)

	* s/netbsd.h: Use -Wl syntax.

561 562 563 564
2003-07-17  Richard M. Stallman  <rms@gnu.org>

	* xterm.c (xim_initialize): Redo 6/24 change.

Stefan Monnier's avatar
Stefan Monnier committed
565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583
2003-07-15  Stefan Monnier  <monnier@cs.yale.edu>

	* buffer.c (copy_overlays): Use EMACS_INT for positions.
	(Fswitch_to_buffer): Don't signal an error when switching to the same
	buffer in a dedicated window.

	* alloc.c: Use bitmaps for cons, as was done for floats.
	(init_float, init_cons): Let the normal code allocate the first block.
	(CONS_BLOCK_SIZE): Redefine based on BLOCK_BYTES and bitmap size.
	(CONS_BLOCK, CONS_INDEX, CONS_MARKED_P, CONS_MARK, CONS_UNMARK):
	New macros.
	(struct cons_block): Move conses to the beginning.  Add gcmarkbits.
	(Fcons): Use lisp_align_malloc and CONS_UNMARK.
	(live_cons_p): Check the pointer is not past the `conses' array.
	(mark_maybe_object, mark_maybe_pointer): Use CONS_MARKED_P.
	(mark_object, mark_buffer): Use CONS_MARKED_P and CONS_MARK.
	(survives_gc_p): Use CONS_MARKED_P and simplify.
	(gc_sweep): Use CONS_MARKED_P, CONS_UNMARK, and lisp_align_free.

Paul Eggert's avatar
Paul Eggert committed
584 585 586 587 588 589 590 591 592 593 594
2003-07-13  Paul Eggert  <eggert@twinsun.com>

	GCC 3.3 (sparc) no longer puts "int foo = 0;" into data; it
	puts it into BSS instead, at least on Solaris 8 and 9.
	This is a valid optimization, and it may occur on other platforms,
	so Emacs should not assume that initializing a static variable to
	zero puts it into data.
	* alloc.c (pure, staticvec):
	Initialize these arrays to nonzero, so that they're not
	put into BSS by that optimization.

Stefan Monnier's avatar
Stefan Monnier committed
595 596 597 598 599 600 601 602
2003-07-13  Stefan Monnier  <monnier@cs.yale.edu>

	* alloc.c (BLOCK_PADDING): Rename from ABLOCKS_PADDING.  Update users.
	(lisp_align_malloc): Use posix_memalign is available.
	(ABLOCKS_BASE): Use HAVE_POSIX_MEMALIGN as an optimization.
	(STRING_BLOCK_SIZE): Rename from STRINGS_IN_STRING_BLOCK
	for consistency.  Update users.

603 604 605 606
2003-07-13  Richard M. Stallman  <rms@gnu.org>

	* s/netbsd.h (START_FILES_1, END_FILES_1): Always define them.

Juanma Barranquero's avatar
Juanma Barranquero committed
607 608 609 610 611 612 613 614 615 616 617 618 619
2003-07-13  Terje Rosten  <terjeros@phys.ntnu.no>

	* xterm.c (x_bitmap_icon,x_wm_set_icon_pixmap): Modify to add mask,
	and use the Gtk+ function gtk_window_icon_from_file if available.

	* xfns.c (x_bitmap_mask, x_create_bitmap_mask): New functions to
	handle mask of bitmaps.
	(x_allocate_bitmap_record, x_destroy_bitmap): Modify to handle the
	mask property.
	(xg_set_icon): New function, wrapper for gtk_window_icon_from_file.

	* xterm.h (xg_set_icon): New function.

620 621 622 623 624
2003-07-12  Paul Eggert  <eggert@twinsun.com>

	* unexelf.c (unexec): Consider a section to precede the .bss
	section if its addresses overlap that of .bss.

625 626 627 628 629 630 631 632 633 634
2003-07-12  Richard M. Stallman  <rms@gnu.org>

	* Makefile.in (CFLAGS) [!OPTIMIZE]: Set CFLAGS to -g.

	* config.in (HAVE_CRTIN): Add #undef.
	(INLINE): Really inline only if OPTIMIZE is defined.

	* s/netbsd.h (START_FILES, LIB_STANDARD): Use START_FILES_1,
	END_FILES_1.
	(START_FILES_1, END_FILES_1): New macros (conditional).
Stefan Monnier's avatar
Stefan Monnier committed
635
	(LD_SWITCH_SYSTEM_TEMACS): Define.
636 637

	* s/openbsd.h: Don't include bsd4-3.h.
Stefan Monnier's avatar
Stefan Monnier committed
638 639 640
	(TERMINFO): Define.
	(LIBS_TERMCAP): Define.
	(LD_SWITCH_SYSTEM): Define (two definitions).
641 642 643

	* xfns.c: Include libpng/png.h instead of png.h.

644 645 646 647 648 649
2003-07-11  Andreas Schwab  <schwab@suse.de>

	* buffer.c (modify_overlay): Update prototype.
	* lisp.h (adjust_overlays_for_insert, adjust_overlays_for_delete):
	Likewise.

650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668
2003-07-09  Stefan Monnier  <monnier@cs.yale.edu>

	* lisp.h (VALBITS): Define in terms of GCTYPEBITS.
	(struct interval): Move to intervals.h.
	(struct Lisp_Marker): Use EMACS_INT for position info.
	(forward_point): Remove prototype of defunct function.
	(Qmodification_hooks, Qrear_nonsticky, Fnext_property_change)
	(Fget_text_property, Fset_text_properties, Ftext_propertes_not_all)
	(syms_of_textprop, set_text_properties): Remove prototypes that are
	already in intervals.h.

	* intervals.h (struct interval): Move from lisp.h.
	Use EMACS_INT for position and size info.

	* coding.c: Include intervals.h for Fset_text_properties.

	* buffer.h (struct buffer_text, struct buffer): Use EMACS_INT for
	position and length information.

Stefan Monnier's avatar
Stefan Monnier committed
669 670 671 672 673
2003-07-09  Stefan Monnier  <monnier@cs.yale.edu>

	* buffer.h (struct buffer_text, struct buffer): Use EMACS_INT for
	position and length information.

674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710
2003-07-09  Stefan Monnier  <monnier@cs.yale.edu>

	Change overlays_after and overlays_before so the overlays themselves
	are linked into lists, rather than using cons cells.  After all each
	Lisp_Misc already occupies 5 words, so we can add a `next' field to
	Lisp_Overlay for free and save up one cons cell per overlay (not
	to mention one indirection when traversing the list of overlay).

	* lisp.h (struct Lisp_Overlay): New field `next'.

	* buffer.h (struct buffer): Change overlays_before and overlays_after
	from Lisp lists of overlays to pointers to overlays.

	* buffer.c (overlay_strings, recenter_overlay_lists):
	Fix typo in eassert in last commit.
	(unchain_overlay): New function.
	(add_overlay_mod_hooklist): Use AREF.
	(copy_overlays, reset_buffer, overlays_at, overlays_in)
	(overlay_touches_p, overlay_strings, recenter_overlay_lists)
	(fix_overlays_in_range, fix_overlays_before, Fmake_overlay)
	(Fmove_overlay, Fdelete_overlay, Foverlay_lists)
	(report_overlay_modification, evaporate_overlays, init_buffer_once):
	Adjust to new type of overlays_(before|after).

	* alloc.c (mark_object): Mark the new `next' field of overlays.
	(mark_buffer): Manually mark the overlays_(after|before) fields.

	* coding.c (run_pre_post_conversion_on_str):
	* editfns.c (overlays_around):
	* xdisp.c (load_overlay_strings):
	* fileio.c (Finsert_file_contents):
	* indent.c (current_column):
	* insdel.c (signal_before_change, signal_after_change):
	* intervals.c (set_point_both):
	* print.c (temp_output_buffer_setup): Use new type for
	overlays_(before|after).

Stefan Monnier's avatar
Stefan Monnier committed
711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732
2003-07-08  Stefan Monnier  <monnier@cs.yale.edu>

	* buffer.c (report_overlay_modification): Don't run hooks while
	traversing the list of overlays.

	* buffer.h (struct buffer): Use an int for overlay_center.
	(overlays_at, evaporate_overlays, recenter_overlay_lists)
	(overlay_strings, fix_overlays_before): Use EMACS_INT for positions.

	* buffer.c (reset_buffer, recenter_overlay_lists)
	(adjust_overlays_for_insert, adjust_overlays_for_delete)
	(fix_overlays_in_range, Fmake_overlay, Fmove_overlay)
	(evaporate_overlays, init_buffer_once): Update use of overlay_center.
	(overlays_at, evaporate_overlays, recenter_overlay_lists)
	(overlay_strings, fix_overlays_before): Use EMACS_INT for positions.

	* xdisp.c (fast_find_position): Remove unused var.

	* cmds.c (Qexpand_abbrev): New sym.
	(syms_of_cmds): Initialize it.
	(internal_self_insert): Use it to call expand-abbrev.

Kim F. Storm's avatar
Kim F. Storm committed
733 734 735 736
2003-07-09  Kim F. Storm  <storm@cua.dk>

	* xterm.c (use_xim) [!USE_XIM]: Default to disable XIM if emacs
	was configured with --without-xim.
Kim F. Storm's avatar
Kim F. Storm committed
737
	(x_term_init) [!USE_XIM]: Use `useXIM' resource to turn on XIM.
Kim F. Storm's avatar
Kim F. Storm committed
738

739 740 741 742 743 744
2003-07-07  Richard M. Stallman  <rms@gnu.org>

	* xdisp.c (reseat_1): Set it->area to TEXT_AREA.

	* alloc.c (Fgarbage_collect): Doc fix.

745 746 747 748
2003-07-07  Nozomu Ando  <nand@mac.com>  (tiny change)

	* buffer.c (Fkill_buffer): Clear charpos cache if necessary.

749 750
2003-07-06  Stefan Monnier  <monnier@cs.yale.edu>

Stefan Monnier's avatar
Stefan Monnier committed
751 752 753
	* minibuf.c (read_minibuf): UNGCPRO before returning.
	(Ftry_completion, Fall_completions): Doc fix.

754 755 756
	* alloc.c (live_float_p): Check that p is not past the `floats' array,
	now that `floats' is not the last element of the struct any more.

757 758 759 760 761 762 763 764 765 766 767
2003-07-06  Jason Rumney  <jasonr@gnu.org>

	* w32term.h (ClipboardSequence_Proc): New type.

	* w32fns.c (clipboard_sequence_fn): New variable.
	(globals_of_w32fns): Initialize it.

	* w32select.c (last_clipboard_sequence_number): New variable.
	(Fw32_set_clipboard_data, Fw32_get_clipboard_data): Use sequence
	number if possible.

768 769
2003-07-06  Stefan Monnier  <monnier@cs.yale.edu>

770 771 772 773 774 775 776 777
	* m/amdx86-64.h (MARKBIT):
	* m/ia64.h (MARKBIT): Remove definition since lisp.h does not compare
	MARKBIT and ARRAY_MARK_FLAG any more.

	* m/hp800.h (XSETMARKBIT):
	* m/sr2k.h (XSETMARKBIT):
	* lisp.h (XSETMARKBIT): Remove unused macro.

778 779 780 781 782 783 784 785 786 787 788 789
	* lisp.h (mark_object): Change prototype.

	* alloc.c (mark_object): Change arg *Lisp_Object -> Lisp_Object.
	(last_marked): Change accordingly.
	(mark_interval, mark_maybe_object, mark_maybe_pointer)
	(Fgarbage_collect, mark_glyph_matrix, mark_face_cache, mark_image)
	(mark_buffer): Update calls to mark_object.

	* bytecode.c (mark_byte_stack):
	* fns.c (sweep_weak_table):
	* keyboard.c (mark_kboards): Update calls to mark_object.

Jason Rumney's avatar
Jason Rumney committed
790 791 792 793
2003-07-06  Jason Rumney  <jasonr@gnu.org>

	* alloc.c (struct ablock): Only include padding when there is some.

Stefan Monnier's avatar
Stefan Monnier committed
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817
2003-07-04  Stefan Monnier  <monnier@cs.yale.edu>

	* alloc.c (ALIGN): Add casts to simplify usage.
	(BLOCK_ALIGN, BLOCK_BYTES, ABLOCKS_PADDING, ABLOCKS_SIZE)
	(ABLOCKS_BYTES, ABLOCK_ABASE, ABLOCKS_BUSY, ABLOCKS_BASE): New macros.
	(struct ablock, struct ablocks): New types.
	(free_ablock): New global var.
	(lisp_align_malloc, lisp_align_free): New functions.
	(FLOAT_BLOCK_SIZE): Redefine in terms of BLOCK_BYTES.
	(struct float_block): Reorder and add gcmarkbits.
	(GETMARKBIT, SETMARKBIT, UNSETMARKBIT, FLOAT_BLOCK, FLOAT_INDEX)
	(FLOAT_MARKED_P, FLOAT_MARK, FLOAT_UNMARK): New macros.
	(init_float, make_float): Use lisp_align_malloc.
	(free_float, live_float_p): Don't use `type' any more.
	(make_float): Use FLOAT_UNMARK to access to mark bit.
	(mark_maybe_object, mark_maybe_pointer, survives_gc_p):
	Use FLOAT_MARKED_P to access the mark bit.
	(pure_alloc): Simplify use of ALIGN.
	(mark_object): Use FLOAT_MARK to access the mark bit.
	(gc_sweep): Use new macros to access the float's mark bit.
	(init_alloc_once): Init free_ablock.

	* lisp.h (struct Lisp_Float): Remove unused field `type'.

818 819 820 821 822 823 824 825 826 827 828 829
2003-06-27  Stefan Monnier  <monnier@cs.yale.edu>

	* alloc.c (VECTOR_MARK, VECTOR_UNMARK, VECTOR_MARKED_P): New macros.
	(GC_STRING_BYTES): Don't mask markbit (it's only used on `size').
	(allocate_buffer): Move.
	(string_bytes): Don't mask markbit of `size_byte'.
	(mark_maybe_object, mark_maybe_pointer, Fgarbage_collect)
	(mark_object, mark_buffer, survives_gc_p, gc_sweep):
	Use the `size' field of buffers (rather than the `name' field) for
	the mark bit, as is done for all other vectorlike objects.
	Use the new macros to access the mark bit of vectorlike objects.

830 831 832 833 834 835 836 837
2003-06-26  Richard M. Stallman  <rms@gnu.org>

	* puresize.h (BASE_PURESIZE): Increment base size.

	* xdisp.c (fast_find_position): Enable Gerd's new definition.

	* xterm.c (xim_initialize): Undo previous change.

838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865
2003-06-26  Stefan Monnier  <monnier@cs.yale.edu>

	* alloc.c (survives_gc_p): Simplify.

	* buffer.c (set_buffer_internal_1): Test CONSP for lists.

	* window.c (Fset_window_dedicated_p): Simplify.
	(display_buffer_1): Don't raise the win from which minibuf was entered.
	(temp_output_buffer_show): Don't assume BEG == 1.  Simplify.
	(Fminibuffer_selected_window): Simplify.

	* buffer.h (struct buffer_text): Lisp_Object `markers' => Lisp_Marker.

	* lisp.h (unchain_marker): Lisp_Object arg => Lisp_Marker.
	(struct Lisp_Marker): Lisp_Object `chain' => Lisp_Marker `next'.

	* insdel.c (check_markers, adjust_markers_for_delete)
	(adjust_markers_for_insert, adjust_markers_for_replace)
	(prepare_to_modify_buffer, RESTORE_VALUE):
	* marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos)
	(Fset_marker, set_marker_restricted, set_marker_both, unchain_marker)
	(set_marker_restricted_both, Fbuffer_has_markers_at, count_markers):
	* alloc.c (Fmake_marker, free_marker, gc_sweep):
	* buffer.c (Fget_buffer_create, Fkill_buffer, Fset_buffer_multibyte):
	* editfns.c (save_excursion_restore, transpose_markers):
	* window.c (delete_window):
	* xdisp.c (message_dolog): Update for new types.

866 867
2003-06-26  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

868 869
	* xfaces.c (set_font_frame_param): Set default_face_done_p to zero.
	(realize_default_face): Use default_face_done_p for the force_p
870
	argument to set_lface_from_font_name.  Set default_face_done_p to one.
871 872 873 874 875

	* frame.c (make_frame): Initialize default_face_done_p.

	* frame.h (struct frame): Add default_face_done_p.

876 877 878
	* config.in: Add XRegisterIMInstantiateCallback_arg6 so it
	will be defined.

879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894
2003-06-25  Stefan Monnier  <monnier@cs.yale.edu>

	* alloc.c (make_interval, Fmake_symbol, allocate_misc):
	Initialize the new field `gcmarkbit'.
	(mark_interval, MARK_INTERVAL_TREE): Use the new `gcmarkbit' field.
	(mark_interval_tree): Don't mark the tree separately from the nodes.
	(UNMARK_BALANCE_INTERVALS): Don't unmark the tree.
	(mark_maybe_object, mark_maybe_pointer, Fgarbage_collect)
	(mark_object, survives_gc_p, gc_sweep): Use new `gcmarkbit' fields.

	* lisp.h (struct interval, struct Lisp_Symbol, struct Lisp_Free)
	(struct Lisp_Marker, struct Lisp_Intfwd, struct Lisp_Boolfwd)
	(struct Lisp_Kboard_Objfwd, struct Lisp_Save_Value)
	(struct Lisp_Buffer_Local_Value, struct Lisp_Overlay)
	(struct Lisp_Objfwd, struct Lisp_Buffer_Objfwd): Add `gcmarkbit' field.

895 896 897 898 899 900 901
2003-06-24  Dave Love  <fx@gnu.org>

	* xterm.c (xim_initialize): Use XRegisterIMInstantiateCallback_arg6.

	* strftime.c: Test HAVE_SYS__MBSTATE_H, not __hpux.  Merge changes
	from gnulib.

902 903 904 905 906 907 908 909 910 911 912 913 914
2003-06-21  Richard M. Stallman  <rms@gnu.org>

	* fileio.c (Fwrite_region): Alternate messages
	for append and partial write.

	* keyboard.c (read_key_sequence): When converting upcase fn key to
	downcase, update fkey and keytran so `backspace' gets translated.

	* keyboard.c (read_avail_input): Don't signal SIGHUP in batch mode.

	* process.c (wait_reading_process_input): Don't signal SIGIO
	in batch mode.

Kenichi Handa's avatar
Kenichi Handa committed
915 916 917 918 919 920 921 922 923 924 925
2003-06-17  Kenichi Handa  <handa@m17n.org>

	* Makefile.in (xselect.o): Don't depend on charset.h, coding.h,
	composite.h.

	* xselect.c: Don't include charset.h, coding.h, composite.h.
	(Qforeign_selection): New variable.
	(syms_of_xselect): Intern and static it.
	(selection_data_to_lisp_data): Return a unibyte string made from
	data with `foreign-selection' text property.

926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945
2003-06-15  Stefan Monnier  <monnier@cs.yale.edu>

	* termhooks.h (EVENT_INIT): New macro.

	* keyboard.c (mark_kboards): Move from alloc.c.  Mark kbd_buffer.

	* alloc.c (mark_kboards): Move to keyboard.c.

	* keyboard.c (record_asynch_buffer_change, read_avail_input):
	* xterm.c (x_dispatch_event):
	* xmenu.c (find_and_call_menu_selection):
	* xdisp.c (handle_tool_bar_click):
	* w32menu.c (menubar_selection_callback):
	* sysdep.c (kbd_input_ast, read_input_waiting):
	* msdos.c (dos_rawgetc):
	* macterm.c (mac_check_for_quit_char):
	* macmenu.c (menubar_selection_callback):
	* gtkutil.c (xg_tool_bar_callback): Don't pass uninitialized
	data to kbd_buffer_store_event.

Kim F. Storm's avatar
Kim F. Storm committed
946 947 948
2003-06-15  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (x_fix_overlapping_area): Always use area relative X
949
	to fix redisplay problem with tall characters (such as ,AC(B).
Kim F. Storm's avatar
Kim F. Storm committed
950

951 952 953 954
2003-06-13  Kai Gro,A_(Bjohann  <kai.grossjohann@gmx.net>

	* fileio.c (Fcopy_file): Doc fix: copies file modes, too.

Kenichi Handa's avatar
Kenichi Handa committed
955 956 957 958
2003-06-12  Kenichi Handa  <handa@m17n.org>

	* fileio.c (Fwrite_region): Save and restore restriction.

959 960 961 962
2003-06-12  Dave Love  <fx@gnu.org>

	* alloca.c (alloca): Declare arg as size_t.

963 964
	* sysdep.c: Remove redundant include of unistd.h, stdlib.h.
	Use HAVE_DECL_SYS_SIGLIST, not SYS_SIGLIST_DECLARED.
965

966 967 968 969 970
2003-06-11  Dave Love  <fx@gnu.org>

	* search.c (shrink_regexp_cache): Use xrealloc.
	(syms_of_search): Use xmalloc.

Kim F. Storm's avatar
Kim F. Storm committed
971 972 973 974 975 976 977 978 979
2003-06-10  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (phys_cursor_in_rect_p): Fix 2003-05-24 change.
	Adjust phys_cursor.x to be relative to window box, rather than
	text area before checking -- to ensure cursor is redrawn when
	exposing window.
	Note: This also fixes a similar (older) bug if display margins
	are present.

Kenichi Handa's avatar
Kenichi Handa committed
980 981 982 983 984
2003-06-06  Kenichi Handa  <handa@m17n.org>

	* coding.c (encoding_buffer_size): If coding->type is
	coding_type_ccl, double magnification on CRLF encoding.

985 986 987 988 989 990 991 992
2003-06-06  Jason Rumney  <jasonr@gnu.org>

	* w32reg.c (SYSTEM_DEFAULT_RESOURCES): New constant.
	(w32_get_string_resource): Try SYSTEM_DEFAULT_RESOURCES last.

	* xfaces.c (Finternal_face_x_get_resource): Do it on Windows and
	Mac too.

Dave Love's avatar
Dave Love committed
993 994
2003-06-05  Dave Love  <fx@gnu.org>

995 996
	* strftime.c: Merge changes from gnulib.

Dave Love's avatar
Dave Love committed
997 998 999 1000 1001 1002
	* mktime.c (__mktime_internal): Merge changes from gnulib
	involving year 69 and dst2.

	Changes to merge with gnulib version and be consistent with the
	autoconf test:

1003 1004
	* getloadavg.c: Set NLIST_STRUCT from HAVE_NLIST_H.
	Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not NLIST_NAME_UNION.
Dave Love's avatar
Dave Love committed
1005 1006 1007
	[HAVE_LOCALE_H]: Include locale.h.
	(getloadavg) [HAVE_SETLOCALE]: Run sscanf in C locale.

Kim F. Storm's avatar
Kim F. Storm committed
1008 1009 1010 1011 1012 1013 1014
2003-06-05  Kim F. Storm  <storm@cua.dk>

	* window.c (coordinates_in_window): Convert X and Y to window
	relative coordinates inside mode-line and header-line parts.
	Convert X and Y to margin area relative coordinates inside left
	and right display margin parts.

1015 1016 1017 1018 1019
2003-06-05  Jason Rumney  <jasonr@gnu.org>

	* w32fns.c (add_system_logical_colors_to_map): New function.
	(Fx_open_connection): Use it.

Stefan Monnier's avatar
Stefan Monnier committed
1020 1021 1022 1023 1024
2003-06-04  Stefan Monnier  <monnier@cs.yale.edu>

	* process.c (allocate_pty): Revert part of the previous patch.
	(Faccept_process_output): Simplify.

Jason Rumney's avatar
Jason Rumney committed
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036
2003-06-04  Jason Rumney  <jasonr@gnu.org>

	* termhooks.h (enum event_kind): Remove MOUSE_WHEEL_EVENT.

	* keyboard.c (Qmouse_wheel, mouse_wheel_syms)
	(lispy_mouse_wheel_names): Remove.
	(syms_of_keyboard): Remove Qmouse_wheel and mouse_wheel_syms.
	Always define drag_and_drop_syms.

	* macterm.c (XTread_socket): Map mouse wheel events to Emacs
	WHEEL_EVENT events.

Stefan Monnier's avatar
Stefan Monnier committed
1037 1038
2003-06-03  Stefan Monnier  <monnier@cs.yale.edu>

Stefan Monnier's avatar
Stefan Monnier committed
1039 1040
	* xdisp.c (update_tool_bar): Add missing UNGCPRO.

Stefan Monnier's avatar
Stefan Monnier committed
1041 1042
	* buffer.c (init_buffer_once): Make kill-buffer-hook permanent-local.

1043 1044 1045 1046 1047
2003-06-03  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* gtkutil.c (make_menu_item): Make sure we don't crash on a NULL
	menu item label.

1048 1049 1050 1051 1052 1053 1054 1055 1056 1057
2003-06-03  Richard M. Stallman  <rms@gnu.org>

	* window.c (Fwindow_edges): Doc fix.
	(Fwindow_pixel_edges, Fwindow_inside_edges)
	(Fwindow_inside_pixel_edges): New functions.
	(syms_of_window): defsubr them.

	* window.h (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS)
	(WINDOW_MODE_LINE_LINES, WINDOW_HEADER_LINE_LINES): New macros.

Stefan Monnier's avatar
Stefan Monnier committed
1058 1059 1060 1061
2003-06-02  Stefan Monnier  <monnier@cs.yale.edu>

	* dispnew.c (Fsit_for): Don't lie about the number of args.

1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093
2003-06-02  Dave Love  <fx@gnu.org>

	* callproc.c: Use HAVE_FCNTL_H, not USG5.
	(syms_of_callproc) <process-environment>: Doc fix.

	* doc.c: Use HAVE_FCNTL_H, not USG5.

	* xfaces.c (font_rescale_ratio): Fix for K&R.

	* termcap.c: Use HAVE_FCNTL_H, not _POSIX_VERSION.

	* mem-limits.h: Use HAVE_SYS_RESOURCE_H, HAVE_SYS_VLIMIT_H.

	* lread.c [HAVE_FCNTL_H]: Include fcntl.h.

	* gtkutil.c: Include keyboard.h, charset.h, coding.h.
	(xg_create_frame_widgets): Use ENCODE_UTF_8.

	* xterm.c (Qutf_8): Moved to coding.c

	* xmenu.c (ENCODE_MENU_STRING): New.
	(list_of_panes, list_of_items, digest_single_submenu, xmenu_show):
	Use it.

	* coding.h (ENCODE_UTF_8): New.
	(Qutf_8): Declare.

	* coding.c (Qutf_8): New.
	(syms_of_coding): Intern it.

	* fns.c: Doc fixes.

Kenichi Handa's avatar
Kenichi Handa committed
1094 1095 1096 1097
2003-06-02  Kenichi Handa  <handa@m17n.org>

	* buffer.c (Fset_buffer_multibyte): Fix previous change.

Stefan Monnier's avatar
Stefan Monnier committed
1098 1099 1100 1101
2003-06-01  Stefan Monnier  <monnier@cs.yale.edu>

	* lread.c (openp): Make sure STR is a string.

Jason Rumney's avatar
Jason Rumney committed
1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113
2003-06-01  David Ponce  <david@dponce.com>

	* termhooks.h (enum event_kind): Added new WHEEL_EVENT event.
	Declare MOUSE_WHEEL_EVENT only if MAC_OSX defined.

	* keyboard.c (Qmouse_wheel): Declare only if MAC_OSX defined.
	(mouse_wheel_syms, lispy_mouse_wheel_names): Likewise.
	(discard_mouse_events): Discard WHEEL_EVENT events too.
	(lispy_wheel_names, wheel_syms): New.
	(syms_of_keyboard): Init and staticpro `wheel_syms'.  Init and
	staticpro `Qmouse_wheel' and `mouse_wheel_syms' only if MAC_OSX
	defined.
Stefan Monnier's avatar
Stefan Monnier committed
1114
	(make_lispy_event): Add WHEEL_EVENT handler.
Jason Rumney's avatar
Jason Rumney committed
1115 1116 1117 1118 1119

	* w32term.c (construct_mouse_wheel): Construct WHEEL_EVENT.
	(w32_read_socket): Map w32 WM_MOUSEWHEEL events to Emacs
	WHEEL_EVENT events.

1120 1121 1122 1123 1124
2003-05-31  John Paul Wallington  <jpw@gnu.org>

	* Makefile.in (lisp, shortlisp): byte-run, float-sup, map-ynp, and
	timer are in lisp/emacs-lisp.

1125 1126
2003-05-31  Kenichi Handa  <handa@m17n.org>

1127 1128 1129
	* buffer.c (Fset_buffer_multibyte): Correctly recover a narrowed
	region when a buffer is changed to unibyte.

1130 1131 1132
	* charset.h (VALID_LEADING_CODE_P): New macro.
	(UNIBYTE_STR_AS_MULTIBYTE_P): Check more rigidly.

Kenichi Handa's avatar
Kenichi Handa committed
1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147
	* coding.c (DECODE_EMACS_MULE_COMPOSITION_CHAR): If coding->flags
	is nonzero, accept multibyte form of eight-bit-control chars.
	(decode_composition_emacs_mule): Likewise.
	(decode_coding_emacs_mule): Likewise.
	(encode_coding_emacs_mule): If coding->flags is nonzero, produce
	multibyte form of eight-bit-control chars.

	* fileio.c (Qauto_save_coding, auto_save_coding): New variables.
	(Finsert_file_contents): If coding-system-for-read is bound to
	Qauto_save_coding, use the coding system emacs-mule with special
	setting for recovering a file.
	(choose_write_coding_system): On auto saving, use the coding
	system emacs-mule with special setting for auto saving.
	(syms_of_fileio) <Qauto_save_coding>: Intern and staticpro it.

1148 1149 1150 1151 1152
2003-05-30  Kenichi Handa  <handa@m17n.org>

	* coding.c (ccl_coding_driver): Set ccl->eight_bit_control
	properly before calling ccl_driver.

Kenichi Handa's avatar
Kenichi Handa committed
1153
	* ccl.h (struct ccl_program) <eight_bit_control>: Comment fixed.
1154 1155 1156 1157 1158 1159

	* ccl.c (CCL_WRITE_CHAR): Increment extra_bytes only when it is
	nonzero.
	(ccl_driver): Initialize extra_bytes to ccl->eight_bit_control.
	(setup_ccl_program): Initialize ccl->eight_bit_control to zero.

1160 1161 1162 1163 1164
2003-05-29  Glenn Morris  <gmorris@ast.cam.ac.uk>

	* xfaces.c (realize_default_face): Do not abort if lface is
	non-existent - reverts change from 2003-05-19.

Kenichi Handa's avatar
Kenichi Handa committed
1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187
2003-05-29  Kenichi Handa  <handa@m17n.org>

	* coding.c (decode_coding_iso2022): Pay attention to the byte
	sequence of CTEXT extended segment, and retain those bytes as is.

2003-05-28  Kenichi Handa  <handa@m17n.org>

	* coding.c (ENCODE_UNSAFE_CHARACTER): Adjusted for the name change
	of CODING_REPLACEMENT_CHARACTER.
	(decode_coding_iso2022): If CODING_FLAG_ISO_SAFE, set
	CODING_MODE_INHIBIT_UNENCODABLE_CHAR flag in coding->mode, and
	check this flag on encoding.
	(encode_coding_sjis_big5): Check
	CODING_MODE_INHIBIT_UNENCODABLE_CHAR flag of coding->mode.
	(Fset_terminal_coding_system_internal): Set
	CODING_MODE_INHIBIT_UNENCODABLE_CHAR flag in terminal_coding.mode
	instead of setting CODING_FLAG_ISO_SAFE flag in
	terminal_coding.flags.

	* coding.h (CODING_REPLACEMENT_CHARACTER): Renamed from
	CODING_INHIBIT_CHARACTER_SUBSTITUTION.
	(CODING_MODE_INHIBIT_UNENCODABLE_CHAR): New macro.

1188
2003-05-28  Richard M. Stallman  <rms@gnu.org>
1189

1190 1191 1192
	* print.c (syms_of_print) <print-escape-nonascii>: Doc fix.

	* eval.c (unbind_to): Move init of this_binding to separate statement.
1193

Kim F. Storm's avatar
Kim F. Storm committed
1194 1195 1196 1197 1198
2003-05-28  Kim F. Storm  <storm@cua.dk>

	* xdisp.c (expose_window): Fix error in calculation of
	window relative coordinates of area to redisplay.

Jason Rumney's avatar
Jason Rumney committed
1199 1200 1201 1202
2003-05-27  Jason Rumney  <jasonr@gnu.org>

	* w32term.c (GET_WHEEL_DELTA_WPARAM): New macro.

1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216
2003-05-27  David Ponce  <david@dponce.com>

	Handle W32 mouse wheel events as mouse click events, like in X.

	* keyboard.c (make_lispy_event) [WINDOWSNT]: Don't handle
	MOUSE_WHEEL_EVENT anymore.

	* w32term.c (construct_mouse_wheel): Result is a MOUSE_CLICK_EVENT.
	Scrolling down/up the mouse wheel is respectively mapped to mouse
	button 4 and 5.
	(w32_read_socket): Map w32 WM_MOUSEWHEEL events to Emacs
	MOUSE_CLICK_EVENT events.  Forward w32 MSH_MOUSEWHEEL events as
	WM_MOUSEWHEEL events.

1217 1218
2003-05-27  Andreas Schwab  <schwab@suse.de>

1219 1220
	* buffer.c (syms_of_buffer) <default-direction-reversed>: Doc fix.

1221 1222 1223 1224 1225
	* xdisp.c (try_window_id): Avoid aborting if PT is inside a
	partially visible line.

	* alloc.c (Fgarbage_collect): Fix last change.

1226 1227 1228 1229
2003-05-26  John Paul Wallington  <jpw@gnu.org>

	* xfns.c (Fx_create_frame): Don't call Qface_set_after_frame_default.

1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262
2003-05-25  Stefan Monnier  <monnier@cs.yale.edu>

	* window.c (Fset_window_buffer): Add type of `keep_margins'.
	(Fset_window_fringes, Fset_window_scroll_bars): Declare before use.

	* window.h (window_box_text_cols): Declare.

	* xdisp.c (window_text_bottom_y, draw_row_fringe_bitmaps)
	(x_draw_vertical_border): Remove unused var `f'.

	* xfaces.c (build_scalable_font_name): Remove `unused var
	pixel_size' warning.

	* xfns.c (png_load): Remove `unused vars intent, image_gamma' warning.

	* unexelf.c (unexec): Remove `unused var n' warning.

	* strftime.c (my_strftime_localtime_r): Remove `defined but
	unused' warning.

	* process.c (allocate_pty): Remove `unused var stb' and
	`cp might be used uninitialized' warnings.

	* dispnew.c (mode_line_string): Remove unused var `f'.

	* coding.c (find_safe_codings): Remove unused var `i'.

	* bytecode.c (Fbyte_code): Remove `unused val' warning.

	* buffer.c (Fkill_buffer): Remove unused var `list'.

	* alloc.c (Fgarbage_collect): Remove `unused var tail' warning.

1263 1264 1265 1266 1267
2003-05-25  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>

	* frame.c (make_frame): Condition want_fullscreen with
	HAVE_WINDOW_SYSTEM.

Juanma Barranquero's avatar
Juanma Barranquero committed
1268 1269 1270 1271 1272
2003-05-25  Juanma Barranquero  <lektu@terra.es>

	* window.c (Fset_window_scroll_bars): Fix typo in argument name.
	(Fwindow_scroll_bars): Fix typo in docstring.

1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283
2003-05-24  Kim F. Storm  <storm@cua.dk>

	The following changes serve several purposes:

	1) Swap the position of fringes and display margins in windows, i.e.
	the fringes are now displayed between the margins and the text area
	(by default).

	2) Allow fringe and scroll bar parameters to be set per-buffer and
	per-window (like display margins).  Such settings are now stored
	in window configurations, preserved when frames are resized, and
Stefan Monnier's avatar
Stefan Monnier committed
1284
	copied when windows are split vertically or horizontally.
1285 1286 1287
	Several bugs related to display margins have been fixed.

	3) Consistently use FRAME_FONT and FRAME_FONTSET macros.
Stefan Monnier's avatar
Stefan Monnier committed
1288

1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453
	4) Use FRAME_COLUMN_WIDTH (f) consistently throughout the code
	rather than FRAME_WIDTH	(FRAME_FONT (f)).

	5) Introduce a consistent naming of variables, members and macros
	depending on whether their value is measured in pixels or in
	canonical columns/lines.  Pixel dimensions are named *_width and
	*_height, while canonical columns/lines are named *_cols and
	*_lines.  Pixel positions are named *_x and *_y, while column/line
	positions are named *_col and *_line.

	6) Consolidate more of the X, W32, and MAC gui code by moving
	common data into struct frame, and generalize it for the non-gui
	case by using suitable defaults.

	7) Cleanup and consolidate the macros controlling frame and window
	layout into frame.h and window.h, and generalize the use of the
	various window_box_* functions (enhanced to handle the new fringe
	position and the per-window fringe and scroll bar settings).

	* frame.h (struct frame): Rename members height to text_lines,
	width to text_cols, window_height to total_lines, window_width to
	total_cols, new_height to new_text_lines, new_width to
	new_text_cols.  All uses changed.
	(struct frame): New members which consolidate common members of
	x_output, w32_output, and mac_output structures: left_pos,
	top_pos, pixel_height, pixel_width, x_pixels_diff, y_pixels_diff,
	win_gravity, size_hint_flags, border_width, internal_border_width,
	line_height, fringe_cols, left_fringe_width, right_fringe_width,
	want_fullscreen.  All uses changed.
	(struct frame): New member column_width contaning the canonical
	column width, analogue to line_height.  All uses changed.
	(struct frame): Rename members scroll_bar_pixel_width to
	config_scroll_bar_width, and scroll_bar_cols to
	config_scroll_bar_cols.  All uses changed.
	(struct frame): New member scroll_bar_actual_width which
	consolidates and renames the vertical_scroll_bar_extra member of
	x_output, w32_output, and mac_output structures.  All uses changed.
	(FRAME_PIXEL_HEIGHT): Renamed from PIXEL_HEIGHT and moved
	from x/w32/macterm.h files.  All uses changed.  Also change code
	which referred to f->output_data...->pixel_height.
	(FRAME_PIXEL_WIDTH): Renamed from PIXEL_WIDTH and moved
	from x/w32/macterm.h files.  All uses changed. 	Also change code
	which referred to f->output_data...->pixel_width.
	(FRAME_LINES): Renamed from FRAME_HEIGHT.  All uses changed.
	Also change code which referred to f->height.
	(FRAME_COLS): Renamed from FRAME_WIDTH.  All uses changed.
	Also change code which referred to f->width.
	(FRAME_NEW_HEIGHT, FRAME_NEW_WIDTH): Remove macros; change uses
	to update new_text_lines and new_text_cols members directly.
	(FRAME_CONFIG_SCROLL_BAR_WIDTH): Renamed from
	FRAME_SCROLL_BAR_PIXEL_WIDTH.  All uses changed.
	(FRAME_CONFIG_SCROLL_BAR_COLS): Renamed from
	FRAME_SCROLL_BAR_COLS.  All uses changed.
	(FRAME_LEFT_SCROLL_BAR_COLS, FRAME_RIGHT_SCROLL_BAR_COLS):
	Renamed from FRAME_LEFT_SCROLL_BAR_WIDTH and
	FRAME_RIGHT_SCROLL_BAR_WIDTH, resp.  All uses changed.
	(FRAME_SCROLL_BAR_AREA_WIDTH, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
	(FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH): New macros.
	(FRAME_TOTAL_COLS): Renamed from FRAME_WINDOW_WIDTH.
	(SET_FRAME_COLS): Renamed from SET_FRAME_WIDTH.
	(FRAME_TOTAL_COLS_ARG): Renamed from FRAME_WINDOW_WIDTH_ARG.
	(WINDOW_VERTICAL_SCROLL_BAR_COLUMN): Remove unused macro.
	(WINDOW_VERTICAL_SCROLL_BAR_HEIGHT): Remove unused macro.
	(FRAME_LINE_HEIGHT): Renamed from CANON_Y_UNIT.  Unconditionally
	return line_height member (it now has proper value also for
	non-window frames).
	(FRAME_COLUMN_WIDTH): Renamed from CANON_X_UNIT.  Unconditionally
	return new column_width member (rather than the default font width).
	(FRAME_FRINGE_COLS, FRAME_LEFT_FRINGE_WIDTH)
	(FRAME_RIGHT_FRINGE_WIDTH): Renamed from FRAME_X_... and moved
	from x/w32/macterm.h files.  Unconditionally return corresponding
	member of frame structure (they now have proper values also for
	non-window frames).
	(FRAME_TOTAL_FRINGE_WIDTH): Renamed from FRAME_FRINGE_WIDTH.
	Calculate return value from left and right widths.
	(FRAME_INTERNAL_BORDER_WIDTH): Unconditionally return
	internal_border_width member (has proper value for non-window frame).
	(FRAME_PIXEL_X_FROM_CANON_X): Renamed from PIXEL_X_FROM_CANON_X.
	(FRAME_PIXEL_Y_FROM_CANON_Y): Renamed from PIXEL_Y_FROM_CANON_Y.
	(FRAME_CANON_X_FROM_PIXEL_X): Renamed from CANON_X_FROM_PIXEL_X.
	(FRAME_CANON_Y_FROM_PIXEL_Y): Renamed from CANON_Y_FROM_PIXEL_Y.
	(FRAME_LINE_TO_PIXEL_Y): Renamed from CHAR_TO_PIXEL_ROW,
	consolidated from xterm.h, macterm.h, and w32term.h.
	(FRAME_COL_TO_PIXEL_X): Renamed from CHAR_TO_PIXEL_COL,
	consolidated from xterm.h, macterm.h, and w32term.h.
	(FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Renamed from
	CHAR_TO_PIXEL_WIDTH consolidated from x/mac/w32term.h.
	(FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Renamed from
	CHAR_TO_PIXEL_HEIGHT consolidated from x/mac/w32term.h.
	(FRAME_PIXEL_Y_TO_LINE): Renamed from PIXEL_TO_CHAR_ROW
	consolidated from x/mac/w32term.h.
	(FRAME_PIXEL_X_TO_COL): Renamed from PIXEL_TO_CHAR_COL
	consolidated from x/mac/w32term.h.
	(FRAME_PIXEL_WIDTH_TO_TEXT_COLS): Renamed from
	PIXEL_TO_CHAR_WIDTH consolidated from x/mac/w32term.h.
	(FRAME_PIXEL_HEIGHT_TO_TEXT_LINES): Renamed from
	PIXEL_TO_CHAR_HEIGHT consolidated from x/mac/w32term.h.

	* window.h (struct window): Rename members left to left_col,
	top to top_line, height to total_lines, width to total_cols,
	left_margin_width to left_margin_cols, right_margin_width to
	right_margin_cols, orig_height to orig_total_lines, orig_top to
	orig_top_line.  All uses changed.
	(struct window): New members left_fringe_width, right_fringe_width,
	fringes_outside_margins, scroll_bar_width, vertical_scroll_bar_type.
	(WINDOW_XFRAME, WINDOW_FRAME_COLUMN_WIDTH, WINDOW_FRAME_LINE_HEIGHT):
	New macros primarily used to simplify other macros.
	(WINDOW_TOTAL_COLS): New macro.  Change relevant code that
	referred to XINT (w->width).
	(WINDOW_TOTAL_LINES): New macro.  Change relevant code that
	referred to XINT (w->height).
	(WINDOW_TOTAL_WIDTH): New macro.  Change relevant code that
	referred to XINT (w->width) * canon_x_unit.
	(WINDOW_TOTAL_HEIGHT): New macro.  Change relevant code that
	referred to XINT (w->height) * canon_y_unit.
	(WINDOW_LEFT_EDGE_COL): New macro.  Change relevant code that
	referred to XINT (w->left).
	(WINDOW_RIGHT_EDGE_COL): Renamed from WINDOW_RIGHT_EDGE.  Change
	all uses and code that referred to XINT (w->left) + XINT (w->width).
	(WINDOW_TOP_EDGE_LINE): New macro.  Change relevant code that
	referred to XINT (w->top).
	(WINDOW_BOTTOM_EDGE_LINE): New macro.  Change relevant code that
	referred to XINT (w->top) + XINT (w->height).
	(WINDOW_LEFT_EDGE_X): New macro.  Change relevant code that
	referred to XINT (w->left) * canon_x_unit.
	(WINDOW_RIGHT_EDGE_X): New macro.  Change relevant code that
	referred to (XINT (w->left) + XINT (w->width)) * canon_x_unit.
	(WINDOW_TOP_EDGE_Y): New macro.  Change relevant code that
	referred to XINT (w->top) * canon_y_unit.
	(WINDOW_BOTTOM_EDGE_Y): New macro.  Change relevant code that
	referred to (XINT (w->top) + XINT (w->height)) * canon_y_unit.
	(WINDOW_LEFTMOST_P): New macro.
	(WINDOW_BOX_LEFT_EDGE_COL): Renamed from WINDOW_LEFT_MARGIN.
	All uses changed.
	(WINDOW_BOX_RIGHT_EDGE_COL): Renamed from WINDOW_RIGHT_MARGIN.
	All uses changed.
	(WINDOW_BOX_LEFT_EDGE_X): Renamed from
	WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X, moved from dispextern.h.
	Do not exclude left fringe width.
	(WINDOW_BOX_RIGHT_EDGE_X): Renamed from
	WINDOW_DISPLAY_RIGHT_EDGE_PIXEL_X, moved from dispextern.h.
	Do not exclude fringe widths.
	(WINDOW_LEFT_FRINGE_WIDTH, WINDOW_RIGHT_FRINGE_WIDTH)
	(WINDOW_FRINGE_COLS, WINDOW_TOTAL_FRINGE_WIDTH): New macros.
	Change relevant code that referred to FRAME_LEFT_FRINGE_WIDTH,
	FRAME_RIGHT_FRINGE_WIDTH, FRAME_FRINGE_COLS, and
	FRAME_TOTAL_FRINGE_WIDTH to allow per-window fringe settings.
	(WINDOW_HAS_FRINGES_OUTSIDE_MARGINS): New macro.
	(WINDOW_VERTICAL_SCROLL_BAR_TYPE, WINDOW_HAS_VERTICAL_SCROLL_BAR)
	(WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT)
	(WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT)
	(WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
	New macros.  Change code which referenced corresponding
	FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS,
	FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT,
	FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT,
	FRAME_SCROLL_BAR_PIXEL_WIDTH, and FRAME_SCROLL_BAR_COLS macros to
	allow per-window scroll-bar settings.
	(WINDOW_LEFT_SCROLL_BAR_COLS, WINDOW_RIGHT_SCROLL_BAR_COLS): New macros.
	(WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH): New macro.  Change code that
	referred to FRAME_LEFT_SCROLL_BAR_WIDTH.
	(WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH): New macro.  Change code
	that referred to FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT and
	FRAME_SCROLL_BAR_WIDTH.
	(WINDOW_SCROLL_BAR_COLS, WINDOW_SCROLL_BAR_AREA_WIDTH)
Stefan Monnier's avatar
Stefan Monnier committed
1454
	(WINDOW_SCROLL_BAR_AREA_X): New macros.
1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470
	(WINDOW_HEADER_LINE_HEIGHT): Renamed from
	WINDOW_DISPLAY_HEADER_LINE_HEIGHT, moved from dispextern.h.
	(WINDOW_BOX_HEIGHT_NO_MODE_LINE): Renamed from
	WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE, moved from dispextern.h.
	(WINDOW_BOX_TEXT_HEIGHT): Renamed from
	WINDOW_DISPLAY_PIXEL_WIDTH, moved from dispextern.h.
	(WINDOW_TO_FRAME_PIXEL_X, WINDOW_TO_FRAME_PIXEL_Y)
	(FRAME_TO_WINDOW_PIXEL_X, FRAME_TO_WINDOW_PIXEL_Y)
	(WINDOW_TEXT_TO_FRAME_PIXEL_X): Moved here from dispextern.h.
	(WINDOW_LEFT_MARGIN_WIDTH): Renamed from
	WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH, moved from dispextern.h.
	(WINDOW_RIGHT_MARGIN_WIDTH): Renamed from
	WINDOW_DISPLAY_RIGHT_AREA_PIXEL_WIDTH, moved from dispextern.h.
	(window_from_coordinates): Update prototype.
	(Fset_window_buffer): Update EXFUN.
	(set_window_buffer): Update prototype.
Stefan Monnier's avatar
Stefan Monnier committed
1471

1472
	* dispextern.h (struct glyph_matrix): Rename members window_left_x
Stefan Monnier's avatar
Stefan Monnier committed
1473
	to window_left_col, window_top_y to window_top_line.  All uses
1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486
	changed.
	(FRAME_INTERNAL_BORDER_WIDTH_SAFE): Remove macro; can now safely
	use FRAME_INTERNAL_BORDER_WIDTH macro instead as
	internal_border_width is now set to 0 for non-window frames.
	(WINDOW_DISPLAY_PIXEL_WIDTH, WINDOW_DISPLAY_PIXEL_HEIGHT)
	(WINDOW_DISPLAY_MODE_LINE_HEIGHT, WINDOW_DISPLAY_HEADER_LINE_HEIGHT)
	(WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE, WINDOW_DISPLAY_TEXT_HEIGHT)
	(WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X, WINDOW_DISPLAY_RIGHT_EDGE_PIXEL_X)
	(WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y, WINDOW_DISPLAY_BOTTOM_EDGE_PIXEL_Y)
	(WINDOW_TO_FRAME_PIXEL_X, WINDOW_TO_FRAME_PIXEL_Y)
	(FRAME_TO_WINDOW_PIXEL_X, FRAME_TO_WINDOW_PIXEL_Y)
	(WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH)
	(WINDOW_DISPLAY_RIGHT_AREA_PIXEL_WIDTH, WINDOW_WANTS_MODELINE_P):
Stefan Monnier's avatar
Stefan Monnier committed
1487
	Move to window.h and renamed [see window.h changes].
1488 1489
	(WINDOW_AREA_TO_FRAME_PIXEL_X, WINDOW_AREA_PIXEL_WIDTH)
	(WINDOW_DISPLAY_TEXT_AREA_PIXEL_WIDTH): Remove macros.
Stefan Monnier's avatar
Stefan Monnier committed
1490 1491
	(WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
	Use WINDOW_TOTAL_LINES.
1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513
	(frame_update_line_height): Remove prototype.

	* buffer.h (struct buffer): Rename members measured in columns:
	left_margin_width to left_margin_cols, right_margin_width to
	right_margin_cols.  All uses changed.
	New members left_fringe_width, right_fringe_width,
	fringes_outside_margins for per-buffer fringe settings.
	New members scroll_bar_width and vertical_scroll_bar_type for
	per-buffer scroll bar settings.

	* buffer.c (init_buffer_once): Set buffer_defaults and
	buffer_local_flags for new buffer-local variables
	left_fringe_width, right_fringe_width, fringes_outside_margins,
	scroll_bar_width, and vertical_scroll_bar_type.
	(syms_of_buffer): Defvar_per_buffer them, and defvar_lisp_nopro
	default-* variables for them.

	* dispnew.c: Make (many) trivial substitutions for renamed and
	new macros in dispextern.h, frame.h and window.h.
	(mode_line_string): No need to adjust width for mode lines, as it
	is already adjusted by the caller.
	(marginal_area_string): Handle fringes inside/outside margins.
Stefan Monnier's avatar
Stefan Monnier committed
1514

1515 1516 1517 1518 1519 1520 1521 1522 1523 1524
	* frame.c: Make (many) trivial substitutions for renamed and
	new macros in dispextern.h, frame.h and window.h.
	(make_frame): Initialize left_fringe_width, right_fringe_width,
	fringe_cols, scroll_bar_actual_width, border_width,
	internal_border_width, column_width, line_height, x_pixels_diff,
	y_pixels_diff, want_fullscreen, size_hint_flags, and win_gravity
	members with values suitable for a non-window frames.

	* gtkutil.c: Make (many) trivial substitutions for renamed and
	new macros in dispextern.h, frame.h and window.h.
Stefan Monnier's avatar
Stefan Monnier committed
1525

1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560
	* indent.c: Make (few) trivial substitutions for renamed and
	new macros in dispextern.h, frame.h and window.h.

	* keyboard.c: Make (many) trivial substitutions for renamed and
	new macros in dispextern.h, frame.h and window.h.
	(make_lispy_event): Use window positions returned from
	window_from_coordinates when constructing the lisp event for
	MOUSE_CLICK_EVENT and DRAG_N_DROP_EVENT, rather than calculating
	(incorrect) values locally.
	(make_lispy_movement): Use window positions returned from
	window_from_coordinates when constructing the lisp event, rather
	than calculating (incorrect) values locally.

	* scroll.c: Make (some) trivial substitutions for renamed and
	new macros in dispextern.h, frame.h and window.h.

	* sunfns.c (Fsun_menu_internal): Adapt to per-window fringes and
	scroll-bars.

	* sysdep.c: Make (few) trivial substitutions for renamed and
	new macros in dispextern.h, frame.h and window.h.

	* term.c: Make (some) trivial substitutions for renamed and
	new macros in dispextern.h, frame.h and window.h.

	* widget.c: Make (few) trivial substitutions for renamed and
	new macros in dispextern.h, frame.h and window.h.

	* window.c: Make (many) trivial substitutions for renamed and
	new macros in dispextern.h, frame.h and window.h.
	(make_window): Initialize new members
	left_margin_cols, right_margin_cols, left_fringe_width,
	right_fringe_width, fringes_outside_margins, scroll_bar_width,
	and vertical_scroll_bar_type.
	(coordinates_in_window): Adapted to new fringe/margin positions
Stefan Monnier's avatar
Stefan Monnier committed
1561
	and per-window fringes and scroll-bars.
1562
	Fix bug related to incorrectly adjusting coordinates by
Stefan Monnier's avatar
Stefan Monnier committed
1563
	frame's internal_border_width (the effect normally negible since
1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582
	the internal_border_width is typically 0 or 1 pixel, but very
	noticeable for an internal_border_width of e.g. 25 pixels).
	Upon successful return (other than ON_NOTHING), the coordinates
	are now always properly converted to window relative for the
	given display element.
	(window_from_coordinates): Add new parameters wx and wy to
	return the window relative x and y position in the returned
	window and part.  A null arg means, don't return the position.
	All callers changed.
	(adjust_window_margins): New function which may reduce the width
	of the display margins if a window's text area is too small after
	resizing or splitting windows.
	(size_window): Fix bug that did not account for display margin
	widths when checking the minimum width of a window; use
	adjust_window_margins.
	(set_window_buffer): Call Fset_window_fringes and
	Fset_window_scroll_bars to setup per-window elements.
	Add new arg KEEP_MARGINS_P.  Non-nil means to keep window's
	existing display margin, fringe widths, and scroll bar settings
Stefan Monnier's avatar
Stefan Monnier committed
1583 1584
	(e.g. after splitting a window or resizing the frame).
	All callers changed.
1585 1586 1587 1588 1589
	(Fset_window_buffer): New arg KEEP_MARGINS.  All callers changed.
	(Fsplit_window): Duplicate original window's display margin,
	fringe, and scroll-bar settings; then call Fset_window_buffer with
	KEEP_MARGINS non-nil.  This fixes a bug which caused a split
	window to only preserve the display margins in one of the windows.
Juanma Barranquero's avatar
Juanma Barranquero committed
1590
	When splitting horizontally, call adjust_window_margins	on both
1591 1592 1593 1594
	windows to ensure that the text area of the new windows is non too
	narrow.  This fixes a bug which could cause emacs to trap if the
	width of the split window was less than the width of the display
	margins.
Stefan Monnier's avatar
Stefan Monnier committed
1595 1596
	(window_box_text_cols): Renamed from window_internal_width.
	All uses changed.  Adapt to per-window fringes and scroll bars.
1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639