ChangeLog 553 KB
Newer Older
1 2 3 4 5 6 7
2012-07-22  Dmitry Antipov  <dmantipov@yandex.ru>

	Adjust consing_since_gc when objects are explicitly freed.
	* alloc.c (GC_DEFAULT_THRESHOLD): New macro.
	(Fgarbage_collect): Use it.  Change minimum to 1/10 of default.
	(free_cons, free_misc): Subtract object size from consing_since_gc.

8 9 10 11 12 13 14 15
2012-07-22  Dmitry Antipov  <dmantipov@yandex.ru>

	Simplify and cleanup markers positioning code.
	* marker.c (attach_marker): More useful eassert.
	(live_buffer, set_marker_internal): New function.
	(Fset_marker, set_marker_restricted): Use set_marker_internal.
	(set_marker_both, set_marker_restricted_both): Use live_buffer.

16 17 18 19 20
2012-07-22  Paul Eggert  <eggert@cs.ucla.edu>

	* buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
	as it's limited by the amount of memory, not by INT_MAX.

21 22
2012-07-21  Eli Zaretskii  <eliz@gnu.org>

23 24 25 26 27
	* keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
	in special-event-map.  See the discussion at
	http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
	for the reasons.

28
	* w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
29 30 31
	info.dwItemData.  Fixes crashes on 64-bit Windows.  Suggested by
	Fabrice Popineau <fabrice.popineau@supelec.fr>.

32 33 34
2012-07-21  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
35
	(conversationIdentifier): Return value is NSInteger.
36
	* nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
37

38 39 40 41 42
2012-07-21  Chong Yidong  <cyd@gnu.org>

	* window.c (decode_any_window): Signal an error if the window is
	on a dead frame (Bug#11984).

43 44 45 46 47 48 49 50 51 52 53
2012-07-20  Dmitry Antipov  <dmantipov@yandex.ru>

	Add indirection counting to speed up Fkill_buffer.
	* buffer.h (struct buffer): New member.
	* buffer.c (Fget_buffer_create): Set indirection counter to 0.
	(Fmake_indirect_buffer): Set indirection counter to -1, increment
	base buffer indirection counter.
	(compact_buffer): If ENABLE_CHECKING, verify indirection counters.
	(Fkill_buffer): Adjust indirection counters as needed, don't walk
	through buffer list if indirection counter is 0.

54 55 56 57 58 59 60 61 62 63 64
2012-07-20  Dmitry Antipov  <dmantipov@yandex.ru>

	Extend the value returned by Fgarbage_collect with heap statistics.
	* alloc.c (Qheap): New symbol.
	(syms_of_alloc): DEFSYM it.
	(Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
	(Fmemory_free): Remove.
	(syms_of_alloc): Don't defsubr it.
	* buffer.c (Fcompact_buffer): Remove.
	(syms_of_buffer): Don't defsubr it.

Dmitry Antipov's avatar
Dmitry Antipov committed
65 66 67 68 69 70 71 72 73 74 75 76
2012-07-20  Dmitry Antipov  <dmantipov@yandex.ru>

	Make maybe_gc inline.
	Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
	* lisp.h (consing_since_gc, gc_relative_threshold)
	(memory_full_cons_threshold): Revert declaration.
	(maybe_gc): Remove prototype, define as inline.
	* alloc.c: Remove old commented-out code.
	(consing_since_gc, gc_relative_threshold)
	(memory_full_cons_threshold): Revert to global.
	(maybe_gc): Remove.

77 78 79 80 81 82 83 84 85 86 87
2012-07-20  Dmitry Antipov  <dmantipov@yandex.ru>

	Simple wrapper for make_unibyte_string, adjust font_open_by_name.
	* lisp.h (build_unibyte_string): New function.
	* dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
	* sysdep.c, w32fns.c, xfns.c: Use it.
	* font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
	of type Lisp_Object to avoid redundant calls to make_unibyte_string.
	Adjust users accordingly.
	* font.h (font_open_by_name): Adjust prototype.

88 89 90 91 92 93 94 95 96 97 98 99 100 101
2012-07-20  Dmitry Antipov  <dmantipov@yandex.ru>

	Cleanup calls to Fgarbage_collect.
	* lisp.h (maybe_gc): New prototype.
	(consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
	Remove declarations.
	* alloc.c (maybe_gc): New function.
	(consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
	Make them static.
	* bytecode.c (MAYBE_GC): Use maybe_gc.
	* eval.c (eval_sub, Ffuncall): Likewise.
	* keyboard.c (read_char): Likewise.  Adjust call to maybe_gc
	to avoid dependency from auto-save feature.

102 103 104 105 106 107 108 109 110
2012-07-19  Paul Eggert  <eggert@cs.ucla.edu>

	* buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
	(FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
	'for_each_per_buffer_object_at'.
	All uses changed.  It's better to use upper-case for macros that
	cannot be implemented as functions, to give the reader a clue
	that they're special.

111 112 113 114
2012-07-19  Stefan Monnier  <monnier@iro.umontreal.ca>

	* alloc.c (Fgarbage_collect): Tweak docstring.

115 116 117 118 119 120 121 122 123 124 125 126 127
2012-07-19  Dmitry Antipov  <dmantipov@yandex.ru>

	Tweak the value returned from Fgarbage_collect again.
	* alloc.c (Fgarbage_collect): New return value, as confirmed in
	http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
	Adjust documentation.
	(total_vector_bytes): Rename to total_vector_slots, adjust
	accounting.
	(total_free_vector_bytes): Rename to total_free_vector_slots,
	adjust accounting.
	(Qstring_bytes, Qvector_slots): New symbols.
	(syms_of_alloc): DEFSYM them.

Dmitry Antipov's avatar
Dmitry Antipov committed
128 129 130 131 132 133 134 135 136
2012-07-19  Dmitry Antipov  <dmantipov@yandex.ru>

	Buffer compaction primitive which may be used from Lisp.
	* buffer.c (compact_buffer, Fcompact_buffer): New function.
	(syms_of_buffer): Register Fcompact_buffer.
	* alloc.c (Fgarbage_collect): Use compact_buffer.
	* buffer.h (compact_buffer): New prototype.
	(struct buffer_text): New member.

137 138 139 140 141 142 143 144 145 146 147 148 149 150
2012-07-19  Dmitry Antipov  <dmantipov@yandex.ru>

	New macro to iterate over all buffers, miscellaneous cleanups.
	* lisp.h (all_buffers): Remove declaration.
	* buffer.h (all_buffers): Add declaration, with comment.
	(for_each_buffer): New macro.
	* alloc.c (Fgarbage_collect, mark_object): Use it.
	* buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
	(init_buffer): Likewise.
	* data.c (Fset_default): Likewise.
	* coding.c (code_conversion_restore): Remove redundant check
	for dead buffer.
	* buffer.c (Fkill_buffer): Likewise.  Remove obsolete comment.

151 152 153 154 155 156 157 158
2012-07-18  Andreas Schwab  <schwab@linux-m68k.org>

	Fix bug that created negative-length intervals.
	* intervals.c (merge_interval_right, merge_interval_left):
	Do not zero out this interval if it is absorbed by its children,
	as this interval's total length doesn't change in that case.  See
	<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.

159 160
2012-07-18  Paul Eggert  <eggert@cs.ucla.edu>

161 162 163 164
	* alloc.c (Fmake_bool_vector): Fix off-by-8 bug
	when invoking (make-bool-vector N t) and N is a positive
	multiple of 8 -- the last 8 bits were mistakenly cleared.

165 166 167 168 169 170 171 172 173
	Remove some struct layout assumptions in bool vectors.
	* alloc.c (bool_header_size): New constant.
	(header_size, word_size): Move earlier, as they're now used earlier.
	Use 'word_size' in a few more places, where it's appropriate.
	(Fmake_bool_vector, sweep_vectors): Don't assume that there is no
	padding before the data member of a bool vector.
	(sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
	than doing the check by hand with an abort ().

174 175
2012-07-18  Stefan Monnier  <monnier@iro.umontreal.ca>

176 177 178
	* eval.c (Fdefvar): Don't check constants since we only set the var if
	it's not yet defined anyway (bug#11904).

179 180 181 182 183
	* lisp.h (last_undo_boundary): Declare new var.
	* keyboard.c (command_loop_1): Set it.
	* cmds.c (Fself_insert_command): Use it to only remove boundaries that
	were auto-added by the command loop (bug#11774).

184 185 186 187 188
2012-07-18  Andreas Schwab  <schwab@linux-m68k.org>

	* w32font.c (Qsymbol): Remove local definition.
	(syms_of_w32font): Don't DEFSYM it.

189 190 191 192 193 194
2012-07-18  Dmitry Antipov  <dmantipov@yandex.ru>

	Fix sweep_vectors to handle large bool vectors correctly.
	* alloc.c (sweep_vectors): Account total_vector_bytes for
	bool vectors larger than VBLOCK_BYTES_MAX.

195 196 197 198 199
2012-07-18  Chong Yidong  <cyd@gnu.org>

	* frame.c (x_set_frame_parameters): Revert bogus change introduced
	in 2012-05-25 commit by Paul Eggert (Bug#11738).

200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
2012-07-18  Dmitry Antipov  <dmantipov@yandex.ru>

	Return more descriptive data from Fgarbage_collect.
	Suggested by Stefan Monnier in
	http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
	* alloc.c (bounded_number): New function.
	(total_buffers, total_vectors): New variable.
	(total_string_size): Rename to total_string_bytes, adjust users.
	(total_vector_size): Rename to total_vector_bytes, adjust users.
	(sweep_vectors): Account total_vectors and total_vector_bytes.
	(Fgarbage_collect): New return value.  Adjust documentation.
	(gc_sweep): Account total_buffers.
	(Fmemory_free, Fmemory_use_counts): Use bounded_number.
	(VECTOR_SIZE): Remove.
	* data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
	(Qinterval, Qmisc): New symbols.
	(syms_of_data): Initialize them.
	* lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
	(Qcons, Qbuffer): New declarations.

220 221 222 223 224
2012-07-17  Paul Eggert  <eggert@cs.ucla.edu>

	* alloc.c (Fmemory_free): Account for memory-free's own storage.
	Round up, not down.  Improve doc.

225 226 227 228 229 230 231 232
2012-07-17  Dmitry Antipov  <dmantipov@yandex.ru>

	Restore old code in allocate_string_data to avoid Faset breakage.
	Reported by Julien Danjou <julien@danjou.info> in
	http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
	* alloc.c (allocate_string_data): Restore old code with minor
	adjustments, fix comment to explain this subtle issue.

Stefan Monnier's avatar
Stefan Monnier committed
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
2012-07-17  Eli Zaretskii  <eliz@gnu.org>

	Remove FILE_SYSTEM_CASE.
	* s/msdos.h (FILE_SYSTEM_CASE): Don't define.

	* fileio.c (FILE_SYSTEM_CASE): Don't define.
	(Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
	Fixes problems on MS-DOS with Vtemp_file_name_pattern when
	call-process-region passes it through expand-file-name.

	* dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.

2012-07-17  Andreas Schwab  <schwab@linux-m68k.org>

	Fix crash when creating indirect buffer (Bug#11917)
	* buffer.c (buffer_lisp_local_variables): Add argument CLONE.
	Don't handle unbound variables specially if non-zero.
	(Fbuffer_local_variables): Pass zero.
	(clone_per_buffer_values): Pass non-zero.

2012-07-17  Andreas Schwab  <schwab@linux-m68k.org>

	* gnutls.c (emacs_gnutls_handshake): Revert last change.  Add QUIT
	to make the loop interruptible.

2012-07-17  Andreas Schwab  <schwab@linux-m68k.org>

	* gnutls.c (emacs_gnutls_handshake): Only retry if
	GNUTLS_E_INTERRUPTED.

263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
2012-07-17  Dmitry Antipov  <dmantipov@yandex.ru>

	Cleanup and convert miscellaneous checks to eassert.
	* alloc.c (mark_interval): Fix comment, partially rephrase
	old comment from intervals.h (see below).
	* intervals.c (find_interval, adjust_intervals_for_insertion)
	(delete_interval, adjust_intervals_for_deletion)
	(graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
	Convert to eassert.
	(adjust_intervals_for_insertion, make_new_interval):
	Remove obsolete and unused code.
	* intervals.h (struct interval): Remove obsolete comment.
	* textprotp.c (erase_properties): Remove unused code.
	(Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
	(Fremove_list_of_text_properties): Convert to eassert.

Chong Yidong's avatar
Chong Yidong committed
279 280 281 282
2012-07-17  Chong Yidong  <cyd@gnu.org>

	* editfns.c (Finsert_char): Doc fix.

283 284 285 286 287 288 289 290 291 292 293
2012-07-17  Dmitry Antipov  <dmantipov@yandex.ru>

	Fix previous change to make Fmemory_free always accurate.
	* alloc.c (make_interval): Update total_free_intervals.
	(make_float): Likewise for total_free_floats.
	(free_cons, Fcons): Likewise for total_free_conses.
	(SETUP_ON_FREE_LIST, allocate_vector_from_block):
	Likewise for total_free_vector_bytes.
	(Fmake_symbol): Likewise for total_free_symbols.
	(bytes_free): Remove.

294 295 296 297 298 299 300 301 302
2012-07-17  Dmitry Antipov  <dmantipov@yandex.ru>

	Simple free memory accounting feature.
	* alloc.c (bytes_free, total_free_vector_bytes): New variable.
	(sweep_vectors): Accumulate size of free vectors.
	(Fgarbage_collect): Setup bytes_free.
	(Fmemory_free): New function.
	(syms_of_alloc): Register it.

Dmitry Antipov's avatar
Dmitry Antipov committed
303 304 305 306 307 308 309 310
2012-07-17  Dmitry Antipov  <dmantipov@yandex.ru>

	Cleanup overlays checking.
	* buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
	* buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
	eassert and OVERLAYP.
	(sort_overlays): Change to use OVERLAYP.

311 312 313 314 315 316
2012-07-16  René Kyllingstad  <Rene@Kyllingstad.com>  (tiny change)

	* editfns.c (Finsert_char): Make it interactive, and make the
	second arg optional.  Copy interactive spec and docstring from
	ucs-insert.

317 318 319 320 321 322
2012-07-17  Paul Eggert  <eggert@cs.ucla.edu>

	* floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
	Unlike the other wrapped functions, fabs has an unspecified
	effect on errno.

323 324 325 326 327
2012-07-16  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (keyDown): Interpret flags without left/right bits
	as the left key (Bug#11670).

328 329 330 331 332 333 334 335 336 337 338 339
2012-07-16  Dmitry Antipov  <dmantipov@yandex.ru>

	Remove empty and useless init functions.
	* lisp.h (init_character_once, init_fns, init_image)
	(init_filelock, init_sound): Remove prototype.
	* character.c (init_character_once): Remove.
	* filelock.c (init_filelock): Likewise.
	* fns.c (init_fns): Likewise.
	* image.c (init_image): Likewise.
	* sound.c (init_sound): Likewise.
	* emacs.c (main): Adjust accordingly.

Dmitry Antipov's avatar
Dmitry Antipov committed
340 341 342 343 344 345
2012-07-16  Dmitry Antipov  <dmantipov@yandex.ru>

	* gtkutil.h: Tiny cleanups.
	(use_old_gtk_file_dialog): Remove useless declaration.
	(xg_uses_old_file_dialog): Add suggested const attribute.

346 347 348 349 350 351 352
2012-07-15  Eli Zaretskii  <eliz@gnu.org>

	* bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
	(bidi_paragraph_init): Use it to limit search forward for a strong
	directional character in abnormally large paragraphs full of
	neutral or weak characters.  (Bug#11943)

353 354 355 356 357 358 359
2012-07-15  Stefano Facchini  <stefano.facchini@gmail.com>  (tiny change)

	* gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
	the toolbar (Bug#9451).
	(xg_make_tool_item): Give the widget event box a transparent
	background.

360 361 362 363 364 365 366 367 368 369 370 371 372 373 374
2012-07-15  Dmitry Antipov  <dmantipov@yandex.ru>

	Cleanup basic allocation variables and functions.
	* alloc.c (ignore_warnings, init_intervals, init_float)
	(init_cons, init_symbol, init_marker): Remove.
	(interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
	(float_block_index): Initialize to FLOAT_BLOCK_SIZE.
	(cons_block_index): Initialize to CONS_BLOCK_SIZE.
	(symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
	(marker_block_index): Initialize to MARKER_BLOCK_SIZE.
	(staticidx, init_alloc_once, init_strings, free_ablock):
	Remove redundant initialization.
	* fns.c (init_weak_hash_tables): Remove.
	* lisp.h (init_weak_hash_tables): Remove prototype.

375 376 377 378 379 380 381 382 383 384 385
2012-07-15  Dmitry Antipov  <dmantipov@yandex.ru>

	Use zero_vector where appropriate.
	* alloc.c (zero_vector): Define as Lisp_Object.  Adjust users
	accordingly.
	* lisp.h (zero_vector): New declaration.
	* font.c (null_vector): Remove.
	(syms_of_font): Remove initialization and staticpro.
	(font_list_entities, font_find_for_lface): Change to use zero_vector.
	* keymap.c (Faccessible_keymaps): Likewise.

386 387 388 389
2012-07-15  Leo Liu  <sdl.web@gmail.com>

	* fringe.c: Fix typo in comments.

Leo Liu's avatar
Leo Liu committed
390 391 392 393
2012-07-14  Leo Liu  <sdl.web@gmail.com>

	* fringe.c: Add a new bitmap exclamation-mark.

394 395 396 397 398 399 400 401 402 403
2012-07-14  Eli Zaretskii  <eliz@gnu.org>

	* gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.

	* s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
	(HAVE_MENUS): Don't define, defined by editing config.in with
	msdos/sed2v2.inp.
	(GMALLOC_INHIBIT_VALLOC): Don't define.
	(MODE_LINE_BINARY_TEXT): Remove, not used anymore.

404 405 406 407
2012-07-14  Juanma Barranquero  <lekktu@gmail.com>

	* s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.

408 409 410 411 412 413
2012-07-14  Glenn Morris  <rgm@gnu.org>

	* s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
	* s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
	Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.

414 415
2012-07-13  Glenn Morris  <rgm@gnu.org>

416 417
	* s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.

418 419 420
	* s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
	* s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.

421 422
2012-07-13  Jan Djärv  <jan.h.d@swipnet.se>

423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494
	* nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
	(x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
	(ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
	(ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
	where appropriate.
	(ns_exec_path, ns_load_path, changeFont): Put () around assignment used
	as boolean expression.
	(x_set_window_size): Remove unused variable toolbar.
	(ns_get_color_default, ns_mod_to_lisp): Remove.
	(ns_mouse_position): Remove unused variables xchar and ychar.
	(ns_compute_glyph_string_overhangs): Remove unused variable face.
	(ns_set_vertical_scroll_bar): Remove unused variable count.
	(ns_delete_terminal): Remove unused variable i.
	(ns_term_init): Remove unused variables r, g and b.
	(mouseDown): Remove unused variable window.
	(windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
	(initFrameFromEmacs): Remove unused variable vbextra.
	(mouseEntered): Remove unused variables p and dpyinfo.
	(mouseExited): Remove unused variables p and r.
	(ns_define_frame_cursor, ns_clear_frame_area)
	(ns_draw_window_cursor, ns_initialize_display_info): Make static.
	(menuDown): Assign [sender tag] to variable and cast the variable.

	* nsterm.h (menuDown): Add id as type to argument sender.
	(ns_display_info_for_name): Add Lisp_Object argument.
	(ns_term_init): Add Lisp_Object argument.
	(ns_map_event_to_object): Add void argument.
	(ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
	prototype with arguments and only declare if __OBJC__.
	(nxatoms_of_nsselect): Add void argument.
	(ns_lisp_to_cursor_type): Add Lisp_Object argument.
	(ns_alloc_autorelease_pool): Add void argument.
	(ns_release_autorelease_pool): Add void* argument.
	(ns_get_defaults_value): Add const char* argument.

	* nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
	(initFromContents): Use SSDATA where appropriate.
	(ns_update_menubar): Add braces to ambigous if-else.
	(initWithTitle): Put () around assignment in if statement.
	(ns_menu_show): Remove unused variables window and keymap.
	(update_frame_tool_bar): Remove unused variable selected_p.
	(initWithContentRect): Remove unused variable this_cmd_name.

	* nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
	appropriate.
	(setXBMColor): Remove unused variable len.
	(setPixmapData): Put () around assignment in loop statement.

	* nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
	(ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
	where appropriate.
	(ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
	around assignment in loop statement.
	(nsfont_open): Remove unused variable i.
	(nsfont_open): Remove unused variable len.
	(nsfont_draw): Remove unused variable cs.

	* nsfns.m (x_set_icon_name, ns_set_name_internal)
	(ns_set_name_as_filename, ns_implicitly_set_icon_type)
	(x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
	(Fns_get_resource, Fns_set_resource, Fx_open_connection)
	(Fns_font_name, Fns_perform_service)
	(Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
	(Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
	(ns_set_name): Remove unused variable view.
	(x_set_menu_bar_lines): Remove unused variable olines.
	(x_set_tool_bar_lines): Remove unused variable root_window.
	(Fns_list_colors): Put () around assignment in while statement.
	(Fns_perform_service): Remove unused variable len.
	(Fns_display_usable_bounds): Remove unused variable top.
	(syms_of_nsfns): Remove unused variable i.

495 496 497
	* nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
	memcpy (Bug#11907).

Juanma Barranquero's avatar
Juanma Barranquero committed
498
2012-07-13  Kalle Kankare  <kalle.kankare@iki.fi>  (tiny change)
499 500 501 502

	* image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
	and free it with DestroyExceptionInfo (Bug#11558).

503 504 505 506 507 508
2012-07-13  Juanma Barranquero  <lekktu@gmail.com>

	* s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
	(HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
	Set here, not in nt/config.nt.

509 510 511 512 513 514
2012-07-13  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
	cursor overflow into the last glyph on display line when the right
	fringe is off.  (Bug#11832)

515 516 517 518 519
2012-07-13  Paul Eggert  <eggert@cs.ucla.edu>

	* xdisp.c (produce_special_glyphs): Now static.
	* dispextern.h (produce_special_glyphs): Remove decl.

520 521
2012-07-13  Glenn Morris  <rgm@gnu.org>

522 523 524
	* s/bsd-common, s/cygwin.h: Remove empty files.
	* s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.

525 526 527 528 529 530 531 532 533 534 535 536
	* s/usg5-4-common.h (USG, USG5):
	* s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
	* s/sol2-6.h (SOLARIS2):
	* s/irix6-5.h (IRIX6_5):
	* s/hpux10-20.h (USG, USG5, HPUX):
	* s/gnu-linux.h (USG, GNU_LINUX):
	* s/freebsd.h (BSD_SYSTEM):
	* s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
	* s/cygwin.h (CYGWIN):
	* s/bsd-common.h (BSD_SYSTEM, BSD4_2):
	* s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.

Glenn Morris's avatar
Glenn Morris committed
537
2012-07-13  BT Templeton  <bpt@hcoop.net>  (tiny change)
538 539 540

	* nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).

541 542
2012-07-13  Glenn Morris  <rgm@gnu.org>

543 544
	* s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.

545 546
	* s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.

547 548 549
	* process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
	* s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.

550 551
2012-07-12  Glenn Morris  <rgm@gnu.org>

552
	* s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
553 554 555 556 557 558 559

	* process.c (init_process_emacs): Rename from init_process.
	The old name is also the name of a Mach system call.
	* lisp.h, emacs.c: Update for this name change.
	* nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
	longer needed.

560 561 562 563 564 565 566 567 568 569 570 571 572 573
2012-07-12  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
	memmove call that removes glyphs covered by the left truncation
	glyph.  Improve commentary.
	(display_line): Fix display of continuation glyphs on GUI frames
	when the right fringe is turned off and variable-size fonts are
	used in the window.  Move the code that appends a stretch glyph to
	produce_special_glyphs, so that it could be used for truncation
	and continuation glyphs alike.
	(produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
	glyph of a suitably computed width, to align the special glyphs at
	the window margin.  Code moved from display_line.  (Bug#11832)

574 575
2012-07-12  Glenn Morris  <rgm@gnu.org>

576 577 578 579 580
	* s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.

	* s/gnu-linux.h, s/hpux10-20.h:
	Do not unconditionally define HAVE_XRMSETDATABASE.

581 582
	* s/gnu-linux.h (UNIX98_PTYS): Let configure set it.

Paul Eggert's avatar
Paul Eggert committed
583 584 585 586 587 588 589 590
2012-07-12  Paul Eggert  <eggert@cs.ucla.edu>

	Fix typos that broke OS X build.
	Reported by Randal L. Schwartz in
	<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
	* nsterm.m (ns_timeout): Add missing local decl.
	(ns_get_color): snprintf -> sprintf, to fix typo.

591 592
2012-07-12  Glenn Morris  <rgm@gnu.org>

593 594 595 596 597
	* src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
	* src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
	* src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
	Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.

598 599 600
	* s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
	Move PTY_OPEN to configure.

601 602 603 604
	* s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
	* s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
	* s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.

605 606 607 608 609 610 611
2012-07-12  Dmitry Antipov  <dmantipov@yandex.ru>

	Use empty_unibyte_string where applicable.
	* keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
	* lread.c (read1): Likewise.
	* xsettings.c (syms_of_xsettings): Likewise.

612 613
2012-07-12  Glenn Morris  <rgm@gnu.org>

614 615
	* s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
	* s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
616 617 618 619 620 621 622 623
	* s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
	* s/hpux10-20.h (RUN_TIME_REMAP):
	* s/bsd-common.h (TABDLY): Move to configure.

	* s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.

	* s/bsd-common.h, s/darwin.h: Move TAB3 to configure.

624
	* s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
625
	(BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
626 627

	* s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
628

629 630 631
	* s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
	* s/template.h: Move NARROWPROTO to configure.

632 633
2012-07-11  Glenn Morris  <rgm@gnu.org>

Glenn Morris's avatar
Glenn Morris committed
634 635 636
	* s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
	unused since 2011-01-17 change to systty.h.

637 638 639 640
	* s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
	* s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
	Move HAVE_PTYS and HAVE_SOCKETS to configure.

641 642 643 644
2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>

	* s/sol2-6.h (HAVE_LIBKSTAT): Remove.  (Bug#11914)

645 646 647 648 649
2012-07-11  Glenn Morris  <rgm@gnu.org>

	* s/darwin.h, s/gnu-linux.h, s/template.h:
	Move INTERRUPT_INPUT to configure.

650 651 652 653 654 655
2012-07-11  Dmitry Antipov  <dmantipov@yandex.ru>

	Minor adjustments to interning code.
	* lisp.h (intern, intern_c_string): Redefine as static inline
	wrappers for intern_1 and intern_c_string_1, respectively.
	(intern_1, intern_c_string_1): Rename prototypes.
656 657
	* lread.c (intern_1, intern_c_string_1, oblookup): Simplify
	Vobarray checking.
658 659 660
	* font.c (font_intern_prop): Likewise.  Adjust comment.
	* w32font.c (intern_font_name): Likewise.

661 662
2012-07-11  Andreas Schwab  <schwab@linux-m68k.org>

663 664
	* gnutls.c (Fgnutls_boot): Properly parse :keylist argument.

665 666 667 668 669 670 671 672 673 674
	* coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
	of Fcar/Fcdr if possible.
	* font.c (check_otf_features): Likewise.
	* fontset.c (Fnew_fontset): Likewise.
	* gnutls.c (Fgnutls_boot): Likewise.
	* minibuf.c (read_minibuf): Likewise.
	* msdos.c (IT_set_frame_parameters): Likewise.
	* xmenu.c (Fx_popup_dialog): Likewise.
	* w32menu.c (Fx_popup_dialog): Likewise.

675 676
2012-07-11  Glenn Morris  <rgm@gnu.org>

677 678 679
	* s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
	since nothing has defined it on these platforms.

680 681 682
	* s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
	* s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.

683 684 685 686
	* s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
	* s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
	Move CLASH_DETECTION to configure.

Glenn Morris's avatar
Glenn Morris committed
687 688
	* s/gnu.h: Remove file, which is now empty.

689 690 691
	* s/gnu.h, s/gnu-linux.h:
	Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.

692 693 694 695 696 697
2012-07-11  John Wiegley  <johnw@newartisans.com>

	* alloc.c (mark_memory): Guard the "no_address_safety_analysis"
	function attribute, so we only use it if it exists in the
	compiler.

698 699 700 701 702 703 704
2012-07-11  Dmitry Antipov  <dmantipov@yandex.ru>

	Avoid call to strlen in fast_c_string_match_ignore_case.
	* search.c (fast_c_string_match_ignore_case): Change to use
	length argument.  Adjust users accordingly.
	* lisp.h (fast_c_string_match_ignore_case): Adjust prototype.

Paul Eggert's avatar
Paul Eggert committed
705 706
2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>

Paul Eggert's avatar
Paul Eggert committed
707 708 709 710
	Assume mkdir, rmdir.
	* sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
	* sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.

Paul Eggert's avatar
Paul Eggert committed
711 712 713
	Assume rename.
	* sysdep.c (rename) [!HAVE_RENAME]: Remove.

Paul Eggert's avatar
Paul Eggert committed
714 715 716 717 718
	Assume perror.
	* s/hpux10-20.h (HAVE_PERROR): Remove.
	* sysdep.c (perror) [HPUX && !HAVE_PERROR]:
	Remove dummy definition, as this problem was obsolete long ago.

Paul Eggert's avatar
Paul Eggert committed
719 720 721
	Assume strerror.
	* sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.

722 723 724 725
2012-07-11  Dmitry Antipov  <dmantipov@yandex.ru>

	Avoid calls to strlen in font processing functions.
	* font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
726
	(font_open_by_name): Change to use length argument.  Adjust
727
	users accordingly.
728 729 730 731
	* font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
	Adjust prototypes.
	* xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
	Change to return ptrdiff_t.
732 733 734 735
	(xfont_list_pattern, xfont_match): Use length returned by
	xfont_decode_coding_xlfd.
	* xfns.c (x_default_font_parameter): Omit useless xstrdup.

736 737
2012-07-11  Glenn Morris  <rgm@gnu.org>

738 739 740
	* s/darwin.h, s/freebsd.h, s/netbsd.h:
	Move DONT_REOPEN_PTY to configure.

741 742 743
	* sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
	* s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.

744 745
2012-07-10  Paul Eggert  <eggert@cs.ucla.edu>

746 747 748
	Remove "#define unix" that is no longer needed (Bug#11905).
	* s/aix4-2.h (unix): Remove; no longer needed.

749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770
	EMACS_TIME simplification (Bug#11875).
	This replaces macros (which typically do not work in GDB)
	with functions, typedefs and enums, making the code easier to debug.
	The functional style also makes code easier to read and maintain.
	* systime.h: Include <sys/time.h> on all hosts, not just if
	WINDOWSNT, since 'struct timeval' is needed in general.
	(EMACS_TIME): Now a typedef, not a macro.
	(EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
	not macros.
	(EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
	(EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
	(EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
	(EMACS_TIME_LE): Now functions, not macros.
	(EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
	(EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
	which are not functions.  All uses rewritten to use:
	(make_emacs_time): New function.
	(EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
	(EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
	not functions.  All uses rewritten to use the following, respectively:
	(emacs_secs_addr, invalid_emacs_time, get_emacs_time)
	(add_emacs_time, sub_emacs_time): New functions.
Juanma Barranquero's avatar
Juanma Barranquero committed
771
	* atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
772 773 774 775
	* fileio.c (Fcopy_file):
	* xterm.c (XTflash): Get the current time closer to when it's used.
	* makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.

776 777
	* bytecode.c (targets): Suppress -Woverride-init warnings.

778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809
	Simplify by avoiding confusing use of strncpy etc.
	* doc.c (Fsnarf_documentation):
	* fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
	* frame.c (Fmake_terminal_frame):
	* gtkutil.c (get_utf8_string):
	* lread.c (openp):
	* nsmenu.m (ns_update_menubar):
	* regex.c (regerror):
	Prefer memcpy to strncpy and strncat when either will do.
	* fileio.c (Fsubstitute_in_file_name):
	* keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
	(menu_separator_name_p):
	* nsmenu.m (ns_update_menubar):
	Prefer memcmp to strncmp when either will do.
	* nsterm.m: Include <ftoastr.h>.
	(ns_get_color):
	* s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
	Prefer snprintf to strncpy.
	* nsterm.m (ns_term_init):
	* widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
	* nsterm.m (ns_term_init):
	Avoid the need for strncpy, by using build_string or
	make_unibyte_string directly.  Use dtoastr, not snprintf.
	* process.c (Fmake_network_process): Diagnose service names that
	are too long, rather than silently truncating them or creating
	non-null-terminated names.
	(Fnetwork_interface_info): Likewise, for interface names.
	* sysdep.c (system_process_attributes) [GNU_LINUX]:
	Prefer sprintf to strncat.
	* xdisp.c (debug_method_add) [GLYPH_DEBUG]:
	Prefer vsnprintf to vsprintf + strncpy.

810 811 812 813 814
2012-07-10  Glenn Morris  <rgm@gnu.org>

	* dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
	Clarify fallback case.

815 816 817 818 819
2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>

	Use XCAR and XCDR instead of Fcar and Fcdr where possible.
	* callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
	* frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
820
	* w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
821 822
	where argument type is known to be a Lisp_Cons.

Tom Tromey's avatar
Tom Tromey committed
823 824 825 826 827 828 829 830
2012-07-10  Tom Tromey  <tromey@redhat.com>

	* bytecode.c (BYTE_CODE_THREADED): New macro.
	(BYTE_CODES): New macro.  Replaces all old byte-code defines.
	(enum byte_code_op): New type.
	(CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
	(exec_byte_code): Use them.  Use token threading when applicable.

831 832 833 834 835 836 837 838 839 840 841 842 843 844
2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>

	Optimize pure C strings initialization.
	* lisp.h (make_pure_string): Fix prototype.
	(build_pure_c_string): New function, defined as static inline.  This
	provides a better opportunity to optimize away calls to strlen when
	the function is called with compile-time constant argument.
	* alloc.c (make_pure_c_string): Fix comment.  Change to add nchars
	argument, adjust users accordingly.  Use build_pure_c_string where
	appropriate.
	* buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
	* keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
	* xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.

845 846 847 848 849 850 851
2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>

	Avoid calls to strlen in miscellaneous functions.
	* buffer.c (init_buffer): Use precalculated len, adjust if needed.
	* font.c (Ffont_xlfd_name): Likewise.  Change to call make_string.
	* lread.c (openp): Likewise.

852 853 854 855 856 857 858
2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>

	Avoid calls to strlen in path processing functions.
	* fileio.c (file_name_as_directory): Add comment.  Change to add
	srclen argument and return the length of result.  Adjust users
	accordingly.
	(directory_file_name): Fix comment.  Change to add srclen argument,
859
	swap 1st and 2nd arguments to obey the common convention.  Adjust
860 861 862
	users accordingly.
	* filelock.c (fill_in_lock_file_name): Avoid calls to strlen.

863 864
2012-07-10  Glenn Morris  <rgm@gnu.org>

865 866 867
	* s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
	Move PENDING_OUTPUT_COUNT definition to configure.

868 869 870 871
	* s/irix6-5.h (DATA_START, DATA_SEG_BITS):
	* s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
	* s/gnu.h (DATA_START): Move definitions to configure.

872 873 874
	* s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
	We include usg5-4-common.h, which defines them both.

875 876 877
	* s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
	O_RDONLY already includes it).

878 879 880 881 882 883 884 885
	Stop ns builds setting the EMACSLOADPATH environment variable.
	* nsterm.m (ns_load_path): Rename from ns_init_paths.
	Now it does not set EMACSLOADPATH, just returns the load-path string.
	* nsterm.h: Update accordingly.
	* lread.c [HAVE_NS]: Include nsterm.h.
	(init_lread) [HAVE_NS]: Use ns_load_path.
	* emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.

886 887
2012-07-09  Glenn Morris  <rgm@gnu.org>

888 889 890
	* s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
	since the included bsd-common.h does so.

891 892 893 894 895 896 897
	Stop ns builds setting the EMACSPATH environment variable.
	* nsterm.m (ns_exec_path): New function, split from ns_init_paths.
	(ns_init_paths): Do not set EMACSPATH.
	* nsterm.h (ns_exec_path): Add it.
	* callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
	Use ns_exec_path.

898 899
	* nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.

900 901
2012-07-09  Paul Eggert  <eggert@cs.ucla.edu>

902 903 904
	* process.c (wait_reading_process_output): 'waitchannels' was unset
	when read_kbd || !NILP (wait_for_cell); fix this.

905 906 907 908 909 910 911 912 913 914 915 916 917 918
	Add GCC-style 'const' attribute to functions that can use it.
	* character.h (char_resolve_modifier_mask):
	* keyboard.h (make_ctrl_char):
	* lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
	(init_character_once, next_almost_prime, init_fns, init_image)
	(flush_pending_output, init_sound):
	* mem-limits.h (start_of_data):
	* menu.h (finish_menu_items):
	Add ATTRIBUTE_CONST.
	* emacs.c (DEFINE_DUMMY_FUNCTION):
	Declare the dummy function with ATTRIBUTE_CONST.
	* lisp.h (Fbyteorder, Fmax_char, Fidentity):
	Add decls with ATTRIBUTE_CONST.

919 920 921 922 923
	Minor improvements to make_formatted_string.
	* alloc.c (make_formatted_string): Prefer int to ptrdiff_t
	where int is good enough, as vsprintf returns an int.
	* lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.

924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941
2012-07-09  Dmitry Antipov  <dmantipov@yandex.ru>

	Use make_formatted_string to avoid double length calculation.
	* lisp.h (make_formatted_string): New prototype.
	* alloc.c (make_formatted_string): New function.
	* buffer.c (Fgenerate_new_buffer_name): Use it.
	* dbus.c (syms_of_dbusbind): Likewise.
	* editfns.c (Fcurrent_time_zone): Likewise.
	* filelock.c (get_boot_time): Likewise.
	* frame.c (make_terminal_frame, set_term_frame_name)
	(x_report_frame_params): Likewise.
	* image.c (gs_load): Likewise.
	* minibuf.c (get_minibuffer): Likewise.
	* msdos.c (dos_set_window_size): Likewise.
	* process.c (make_process): Likewise.
	* xdisp.c (ensure_echo_area_buffers): Likewise.
	* xsettings.c (apply_xft_settings): Likewise.

942 943 944 945 946 947 948 949 950
2012-07-09  Glenn Morris  <rgm@gnu.org>

	Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
	* nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
	(ns_init_paths): Do not set EMACSDATA, EMACSDOC.
	* nsterm.h (ns_etc_directory): Add it.
	* callproc.c [HAVE_NS]: Include nsterm.h.
	(init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.

951 952 953 954 955 956 957 958 959
2012-07-09  Dmitry Antipov  <dmantipov@yandex.ru>

	Move marker debugging code under MARKER_DEBUG.
	* marker.c (MARKER_DEBUG): Move marker debugging code under
	#ifdef MARKER_DEBUG because byte_char_debug_check is too slow
	for bootstrap with --enable-checking (~3x slowdown reported
	by Juanma Barranquero <lekktu@gmail.com>).
	(verify_bytepos): Move under #ifdef MARKER_DEBUG.

960 961 962 963 964
2012-07-08  Paul Eggert  <eggert@cs.ucla.edu>

	* systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
	See <http://bugs.gnu.org/11825#29>.

965 966 967 968
2012-07-08  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
	has no font, use the frame's font.  (Bug#11813)
969 970 971 972 973 974 975 976
	(display_line): Add commentary about displaying truncation glyphs
	on GUI frames.
	(produce_special_glyphs): Move here from term.c.

	* term.c (produce_special_glyphs): Move to xdisp.c.

	* dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
	section.
977

978 979
2012-07-07  Andreas Schwab  <schwab@linux-m68k.org>

980 981 982
	* xdisp.c (display_line): Avoid warning about implicit declaration
	of FRAME_FONT.

983 984
	* frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.

985 986
	* lisp.h: Remove empty conditional.

987 988
2012-07-07  Paul Eggert  <eggert@cs.ucla.edu>

989 990
	* lread.c (load_path_check): Now static.

991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007
	Fix some minor --with-ns problems found by static checking.
	* frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
	(x_set_font) [!HAVE_X_WINDOWS]:
	* image.c (xpm_load_image) [HAVE_NS]:
	(x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
	(x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
	Remove unused local.
	(Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
	(xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
	* image.c (x_create_bitmap_from_file) [HAVE_NS]:
	(xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
	* nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
	* xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
	Fix pointer signedness problem.
	* xfaces.c (FRAME_X_FONT_TABLE):
	* xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.

1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018
2012-07-07  Glenn Morris  <rgm@gnu.org>

	* lread.c (load_path_check): New function, split from init_lread.
	(init_lread): Reorganize.  Motivation:
	If EMACSLOADPATH is set, check/warn about that rather than the
	defaults, which we are not going to use.  Hence we can remove
	the turn_off_warning and WINDOWSNT || HAVE_NS tests.
	Don't warn if site-lisp directories are missing.
	If not installed, start from a blank load-path, since
	PATH_LOADSEARCH refers to the eventual installation directories.

1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
2012-07-07  Eli Zaretskii  <eliz@gnu.org>

	Support truncation and continuation glyphs on GUI frames, when
	fringes are disabled.  (Bug#11832)
	* xdisp.c (init_iterator): Get dimensions of truncation and
	continuation glyphs even if on GUI frames.  Adjust
	it->last_visible_x on GUI frames when the left or right fringes,
	or both, are absent.
	(start_display, move_it_in_display_line_to): Handle the case of a
	GUI frame without a fringe to display continuation or truncation
	glyphs.
	(insert_left_trunc_glyphs): Support GUI frames: make sure
	truncation glyphs overwrite enough glyphs from the current line to
	have sufficient space in pixels.
	(display_line): Support truncation and continuation glyphs on GUI
	frames.  If some spare pixels are left on the line after inserting
	the truncation glyphs, fill that space with a stretch glyph of a
	suitably computed width.

	* term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
	produce_glyphs, to support GUI sessions.

1041 1042
2012-07-07  Paul Eggert  <eggert@cs.ucla.edu>

1043 1044
	* sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).

1045 1046
	* sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).

1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058
	Do not require float-time's arg to fit in time_t (Bug#11825).
	This works better on hosts where time_t is unsigned, and where
	float-time is applied to the (negative) difference between two times.
	* editfns.c (decode_time_components): Last arg is now double *,
	not int *, and means to store all the result as a double, without
	worrying about whether the seconds part fits in time_t.
	All callers changed.
	(lisp_time_argument): Remove last int * arg, as it's no longer needed.
	All callers changed.
	(Ffloat_time): Do not fail merely because the specified time falls
	outside of time_t range.

1059 1060 1061 1062 1063 1064
2012-07-07  Glenn Morris  <rgm@gnu.org>

	* s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
	* s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
	* s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).

1065 1066 1067 1068 1069 1070 1071
2012-07-07  Juanma Barranquero  <lekktu@gmail.com>

	* makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
	Update dependencies.

	* s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.

1072 1073
2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>

1074 1075 1076 1077 1078 1079 1080
	Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
	* dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
	* dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
	* nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
	* nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
	* xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.

1081 1082
	* xfont.c (compare_font_names): Redo to omit the need for casts.

Andreas Schwab's avatar
Andreas Schwab committed
1083 1084
2012-07-06  Andreas Schwab  <schwab@linux-m68k.org>

1085 1086 1087
	* xfns.c (Fx_change_window_property): Doc fix.
	* w32fns.c (Fx_change_window_property): Doc fix.

Andreas Schwab's avatar
Andreas Schwab committed
1088 1089 1090 1091
	* w32fns.c (Fx_window_property): Accept the same arguments as the
	X Windows version.  Doc fix.
	* xfns.c (Fx_window_property): Doc fix.  (Bug#11870)

Juanma Barranquero's avatar
Juanma Barranquero committed
1092
2012-07-06  Juanma Barranquero  <lekktu@gmail.com>
1093 1094 1095 1096 1097 1098
	    Eli Zaretskii  <eliz@gnu.org>

	* s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
	Windows-specific code from nt/config.nt moved here.
	Obsolete settings removed.

1099 1100 1101 1102 1103 1104 1105
2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>

	* process.c: Avoid unnecessary calls to gettime.
	(wait_reading_process_output): Don't get the time of day
	when gobbling data immediately and not waiting, as there's no need
	for it in that case.  This removes a FIXME.

1106 1107 1108 1109 1110
2012-07-06  Jan Djärv  <jan.h.d@swipnet.se>

	* gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
	is defined (Bug#11768).

Dmitry Antipov's avatar
Dmitry Antipov committed
1111 1112 1113 1114 1115
2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>

	Fix marker debugging code.
	* marker.c (byte_char_debug_check): Do not perform the check
	if buffer is not multibyte.
Juanma Barranquero's avatar
Juanma Barranquero committed
1116 1117
	(buf_charpos_to_bytepos, buf_bytepos_to_charpos):
	Call byte_char_debug_check with correct arguments.
Dmitry Antipov's avatar
Dmitry Antipov committed
1118

1119 1120 1121
2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>

	Compile marker debugging code only if ENABLE_CHECKING is defined.
Juanma Barranquero's avatar
Juanma Barranquero committed
1122 1123
	* marker.c (byte_char_debug_check, count_markers):
	Use only if ENABLE_CHECKING is defined.
1124 1125 1126 1127
	(byte_debug_flag): Remove.
	(CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
	Always call byte_char_debug_check if ENABLE_CHECKING is defined.

1128 1129
2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>

1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141
	Avoid code repetition in marker-related functions.
	* marker.c (attach_marker): New function.
	(Fset_marker, set_marker_restricted, set_marker_both)
	(set_marker_restricted_both): Use it.
	(Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
	Consistently rename charno to charpos.
	(marker_position): Add eassert.
	(marker_byte_position): Convert to eassert.

2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>

	Simplify list operations in unchain_overlay and unchain_marker.
1142
	* buffer.c (unchain_overlay): Simplify.  Add comment.
1143
	* marker.c (unchain_marker): Simplify.  Fix comments.
1144

1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157
2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>

	Introduce fast path for the widely used marker operation.
	* alloc.c (build_marker): New function.
	* lisp.h (build_marker): New prototype.
	* buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
	* composite.c (autocmp_chars): Likewise.
	* editfns.c (buildmark): Remove.
	(Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
	(save_restriction_save): Use build_marker.
	* marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
	* window.c (save_window_save): Likewise.

1158 1159 1160 1161 1162 1163 1164 1165
2012-07-06  Dmitry Antipov  <dmantipov@yandex.ru>

	Do not use Fdelete_overlay in delete_all_overlays
	to avoid redundant calls to unchain_overlay.
	* buffer.c (drop_overlay): New function.
	(delete_all_overlays, Fdelete_overlay): Use it.
	* minibuf.c (get_minibuffer): Fix comment.

Paul Eggert's avatar
Paul Eggert committed
1166 1167 1168 1169 1170 1171 1172 1173 1174 1175
2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>

	Port to OpenBSD 5.1 amd64.
	* sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
	This is needed for OpenBSD, and should be harmless on all BSD systems.
	Also, include <sys/sysctl.h>, as it should be available on all
	BSD_SYSTEM hosts given that we're already calling sysctl in that case.
	(list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
	use p_pid member, not kp_proc.pid.

1176 1177 1178 1179
2012-07-06  Glenn Morris  <rgm@gnu.org>

	* Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.

1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204
2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>

	More xmalloc and related cleanup.
	* alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
	* callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
	* doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
	* font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
	* gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
	* nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
	* regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
	* sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
	* xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
	* xterm.c:
	Omit needless casts involving void * pointers and allocation.
	Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
	as the former is more robust if P's type is changed.
	Prefer xzalloc to xmalloc + memset 0.
	Simplify malloc-or-realloc to realloc.
	Don't worry about xmalloc returning a null pointer.
	Prefer xstrdup to xmalloc + strcpy.
	* editfns.c (Fmessage_box): Grow message_text by at least 80 when
	growing it.
	* keyboard.c (apply_modifiers_uncached): Prefer local array to
	alloca of a constant.

1205 1206 1207 1208 1209 1210 1211
2012-07-05  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (display_line): Fix horizontal pixel coordinates when
	hscroll is larger than the line width.  Fixes long and futile
	looping inside extend_face_to_end_of_line (on a TTY) producing
	glyphs that are not needed and thrown away.

1212 1213 1214 1215 1216
2012-07-05  Dmitry Antipov  <dmantipov@yandex.ru>

	* marker.c (set_marker_restricted_both): Simplify by using
	clip_to_bounds.

1217 1218 1219 1220
2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>

	* editfns.c (region_limit): Simplify by using clip_to_bounds.

1221 1222 1223 1224 1225 1226 1227 1228 1229
2012-07-05  Jan Djärv  <jan.h.d@swipnet.se>

	* gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
	not defined (Bug#11768).
	(xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
	(xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
	(make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
	followed by gtk_box_set_homogeneous (Bug#11768).
	(xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
Juanma Barranquero's avatar
Juanma Barranquero committed
1230 1231
	(update_theme_scrollbar_width, xg_create_scroll_bar):
	Use gtk_scrollbar_new (Bug#11768).
1232 1233 1234
	(xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
	(is_box_type): New function (Bug#11768).
	(xg_tool_item_stale_p): Call is_box_type.
Paul Eggert's avatar
Paul Eggert committed
1235
	(xg_initialize): Get settings by calling gtk_settings_get_for_screen
1236 1237
	with default display (Bug#11768).

1238 1239 1240 1241 1242 1243 1244
2012-07-05  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (window_hscroll_limited): New function.
	(pos_visible_p, init_iterator): Use it to avoid overflow of pixel
	coordinates when window's hscroll is set to insanely large
	values.  (Bug#11857)

1245 1246 1247 1248 1249
2012-07-05  Juanma Barranquero  <lekktu@gmail.com>

	* makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
	($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.

Dmitry Antipov's avatar
Dmitry Antipov committed
1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305
2012-07-05  Dmitry Antipov  <dmantipov@yandex.ru>

	Cleanup xmalloc.
	* lisp.h (xzalloc): New prototype.  Omit needless casts.
	* alloc.c (xzalloc): New function.  Omit needless casts.
	* charset.c: Omit needless casts.  Convert all calls to
	xmalloc with following memset to xzalloc.
	* dispnew.c: Likewise.
	* fringe.c: Likewise.
	* image.c: Likewise.
	* sound.c: Likewise.
	* term.c: Likewise.
	* w32fns.c: Likewise.
	* w32font.c: Likewise.
	* w32term.c: Likewise.
	* xfaces.c: Likewise.
	* xfns.c: Likewise.
	* xterm.c: Likewise.
	* atimer.c: Omit needless casts.
	* buffer.c: Likewise.
	* callproc.c: Likewise.
	* ccl.c: Likewise.
	* coding.c: Likewise.
	* composite.c: Likewise.
	* doc.c: Likewise.
	* doprnt.c: Likewise.
	* editfns.c: Likewise.
	* emacs.c: Likewise.
	* eval.c: Likewise.
	* filelock.c: Likewise.
	* fns.c: Likewise.
	* gtkutil.c: Likewise.
	* keyboard.c: Likewise.
	* lisp.h: Likewise.
	* lread.c: Likewise.
	* minibuf.c: Likewise.
	* msdos.c: Likewise.
	* print.c: Likewise.
	* process.c: Likewise.
	* region-cache.c: Likewise.
	* search.c: Likewise.
	* sysdep.c: Likewise.
	* termcap.c: Likewise.
	* terminal.c: Likewise.
	* tparam.c: Likewise.
	* w16select.c: Likewise.
	* w32.c: Likewise.
	* w32reg.c: Likewise.
	* w32select.c: Likewise.
	* w32uniscribe.c: Likewise.
	* widget.c: Likewise.
	* xdisp.c: Likewise.
	* xmenu.c: Likewise.
	* xrdb.c: Likewise.
	* xselect.c: Likewise.

1306 1307 1308 1309 1310 1311
2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>

	* fileio.c (time_error_value): Check the right error number.
	Problem reported by Troels Nielsen in
	<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.

1312 1313
2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>

1314 1315 1316 1317 1318
	* window.c (set_window_hscroll): Revert the 100000 hscroll limit.
	This should be fixed in a better way; see Eli Zaretskii in
	<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
	(HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.

1319 1320 1321 1322
	* fileio.c (time_error_value): Rename from special_mtime.
	The old name's problems were noted by Eli Zaretskii in
	<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.

1323 1324 1325 1326 1327
	* emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
	This variable's comment says Emacs needs at least one GDB-visible
	symbol of type enum pvec_type, to work around GDB problems.
	The symbol's value doesn't matter.

1328 1329 1330
	* alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
	that causes compilation to fail on pre-C99 compilers.

Juanma Barranquero's avatar
Juanma Barranquero committed
1331
2012-07-04  Juanma Barranquero  <lekktu@gmail.com>
1332 1333 1334 1335

	* s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
	(HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.

1336 1337
2012-07-04  Dmitry Antipov  <dmantipov@yandex.ru>

Juanma Barranquero's avatar
Juanma Barranquero committed
1338
	* buffer.c (init_buffer_once): Fix initialization of
1339 1340 1341
	headers for buffer_defaults and buffer_local_symbols.
	Reported by Juanma Barranquero <lekktu@gmail.com>.

1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362
2012-07-04  Stefan Monnier  <monnier@iro.umontreal.ca>

	Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
	* lisp.h (enum pvec_type): Use fewer bits.
	(PSEUDOVECTOR_SIZE_BITS): New constant.
	(PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
	(XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
	change in pvec_type.
	(PSEUDOVECTOR_TYPEP): New macro.
	(TYPED_PSEUDOVECTORP): Use it.
	* fns.c (internal_equal): Adapt code to extract pvectype.
	* emacs.c (gdb_pvec_type): Update type.
	* alloc.c (PSEUDOVECTOR_NBYTES): New macro.
	(VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
	(VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
	(SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
	(sweep_vectors): Use it.  Use local var `total_bytes' instead of
	abusing vector->header.next.nbytes.
	(live_vector_p): Use PVEC_TYPE.
	(mark_object): Adapt code to extract pvectype.  Use switch.

1363 1364 1365 1366 1367
2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>

	* doprnt.c (doprnt): Don't assume string length fits in 'int'.
	Tighten new eassert a bit.

1368 1369 1370 1371 1372 1373 1374 1375 1376
2012-07-04  Dmitry Antipov  <dmantipov@yandex.ru>

	Fix compilation with --enable-gcc-warnings and -O1
	optimization level.
	* doprnt.c (doprnt): Change type of tem to int, initialize
	to avoid compiler warning.  Add eassert.
	* search.c (simple_search): Initialize match_byte to avoid
	compiler warning.  Add eassert.

1377 1378
2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>

1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389
	Avoid weird behavior with large horizontal scrolls.
	Without this change, for example, large hscroll values would
	mess up Emacs's display on Fedora 15 x86, presumably due to
	overflows in int calculations in the display code.
	Also, if buffers had long lines, Emacs would freeze.
	* window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
	(set_window_hscroll): New function, containing the old guts of
	Fset_window_hscroll.  Return the clipped value.
	(Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
	This avoids the need to check against PTRDIFF_MAX.

1390 1391
	* buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.

1392 1393 1394 1395
2012-07-04  Dmitry Antipov  <dmantipov@yandex.ru>

	* buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.

1396 1397
2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>

1398 1399 1400 1401
	* regex.c: Suppress GCC warning on RHEL 6.  (Bug#11207)
	Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
	since GCC 4.4.6 issues a bogus warning for them.

1402 1403 1404 1405 1406 1407 1408 1409
	Fix bugs in file timestamp newness comparisons.
	* fileio.c (Ffile_newer_than_file_p):
	* lread.c (Fload): Use full timestamp resolution of files,
	not just the 1-second resolution, so that files that are only
	slightly newer still count as newer.
	* fileio.c (Ffile_newer_than_file_p): Don't assume file
	timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.

1410 1411 1412 1413 1414 1415 1416
2012-07-03  Paul Eggert  <eggert@cs.ucla.edu>

	* fileio.c: Improve handling of file time marker.  (Bug#11852)
	(special_mtime): New function.
	(Finsert_file_contents, Fverify_visited_file_modtime):
	Use it to set special mtime values consistently.

1417 1418 1419 1420 1421
2012-07-03  Andreas Schwab  <schwab@linux-m68k.org>

	* fileio.c (Finsert_file_contents): Properly handle st_mtime
	marker for non-existing file.  (Bug#11852)

1422 1423 1424 1425 1426
2012-07-03  Glenn Morris  <rgm@gnu.org>

	* lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
	and did not make it into globals.h).

1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442
2012-07-03  Tom Tromey  <tromey@redhat.com>

	* window.c (Fset_window_margins, Fset_window_fringes)
	(Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
	* textprop.c (Fprevious_property_change): No longer static.
	* syntax.c (Fsyntax_table_p): No longer static.
	* process.c (Fget_process, Fprocess_datagram_address): No longer
	static.
	* keymap.c (Flookup_key, Fcopy_keymap): No longer static.
	* keyboard.c (Fcommand_execute): No longer static.
	Remove EXFUN.
	* insdel.c (Fcombine_after_change_execute): No longer static.
	* image.c (Finit_image_library): No longer static.
	* fileio.c (Fmake_symbolic_link): No longer static.
	* eval.c (Ffetch_bytecode): No longer static.
	* editfns.c (Fuser_full_name): No longer static.
Juanma Barranquero's avatar
Juanma Barranquero committed
1443 1444
	* doc.c (Fdocumentation_property, Fsnarf_documentation):
	No longer static.
1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464
	* buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
	static.
	* dired.c (Ffile_attributes): No longer static.
	* composite.c (Fcomposition_get_gstring): No longer static.
	* callproc.c (Fgetenv_internal): No longer static.

	* ccl.h: Remove EXFUNs.
	* buffer.h: Remove EXFUNs.
	* dispextern.h: Remove EXFUNs.
	* intervals.h: Remove EXFUNs.
	* fontset.h: Remove EXFUN.
	* font.h: Remove EXFUNs.
	* dosfns.c (system_process_attributes): Remove EXFUN.
	* keymap.h: Remove EXFUNs.
	* lisp.h: Remove EXFUNs.
	* w32term.h: Remove EXFUNs.
	* window.h: Remove EXFUNs.
	* xsettings.h: Remove EXFUN.
	* xterm.h: Remove EXFUN.

1465 1466 1467 1468 1469 1470
2012-07-03  Glenn Morris  <rgm@gnu.org>

	* lisp.h (Frandom): Make it visible to C.
	* buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
	buffer for invisible buffers.  (Bug#1229)

1471 1472 1473 1474 1475 1476 1477 1478
2012-07-03  Dmitry Antipov  <dmantipov@yandex.ru>

	Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
	values which aren't power of 2.
	* alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.  Verify
	it's value and the value of VECTOR_BLOCK_SIZE.  Adjust users
	accordingly.

1479 1480 1481 1482 1483 1484
2012-07-03  Stefan Monnier  <monnier@iro.umontreal.ca>

	* lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.

	* alloc.c (mark_object): Revert part of last patch to use `switch'.

1485 1486 1487 1488 1489 1490 1491
2012-07-03  Dmitry Antipov  <dmantipov@yandex.ru>

	* alloc.c (allocate_vector_block): Remove redundant
	calls to mallopt if DOUG_LEA_MALLOC is defined.
	(allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
	avoid calls to mallopt if zero_vector is returned.

1492 1493 1494 1495 1496 1497
2012-07-03  Dmitry Antipov  <dmantipov@yandex.ru>

	* alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
	is enabled, avoid dereferencing NULL current_sblock if
	running undumped.

1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517
2012-07-03  Dmitry Antipov  <dmantipov@yandex.ru>

	Cleanup basic buffer management.
	* buffer.h (struct buffer): Change layout to use generic vector
	marking code.  Fix some comments.  Change type of 'clip_changed'
	to bitfield.  Remove unused #ifndef old.
	(FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
	(GET_OVERLAYS_AT): Fix indentation.
	(for_each_per_buffer_object_at): New macro.
	* buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
	(Fbuffer_local_variables): Use it.
	(init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
	* alloc.c (allocate_buffer): Adjust to match new layout of
	struct buffer.  Fix comment.
	(mark_overlay): New function.
	(mark_buffer): Use it.  Use mark_vectorlike to mark normal
	Lisp area of struct buffer.
	(mark_object): Use it.  Adjust marking of misc objects
	and related comments.

1518 1519 1520 1521 1522 1523 1524
2012-07-02  Paul Eggert  <eggert@cs.ucla.edu>

	* alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
	wrapper that is not needed because the wrapped code is a no-op (zero
	machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
	This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.

1525 1526 1527 1528
2012-07-02  Dmitry Antipov  <dmantipov@yandex.ru>

	* alloc.c (mark_buffer): Simplify.  Remove prototype.
	(mark_object): Add comment.  Reorganize marking of vector-like
Dmitry Antipov's avatar
Dmitry Antipov committed
1529
	objects.  Use CHECK_LIVE for all vector-like objects except buffers
1530 1531 1532
	and subroutines when GC_CHECK_MARKED_OBJECTS is defined.  Avoid
	redundant calls to mark_vectorlike for bool vectors.

1533 1534
2012-06-30  Glenn Morris  <rgm@gnu.org>

1535 1536
	* nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.

1537 1538 1539 1540 1541
	* epaths.in (PATH_SITELOADSEARCH): New.
	* lread.c (init_lread): Use PATH_SITELOADSEARCH.
	This is rather than relying on --enable-locallisppath elements
	having "site-lisp" in their names.  (Bug#10208#25, 11658)

1542 1543
2012-06-30  Eli Zaretskii  <eliz@gnu.org>

1544 1545 1546 1547
	* w32proc.c (sys_select): Accept and ignore one more argument.

	* w32.c (emacs_gnutls_pull): Call select with one more argument.

1548
	* sysselect.h [DOS_NT]: Don't include sys/select.h.
1549
	(pselect) [!MS_DOS]: Redirect to sys_select.
1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562

	* sysdep.c: Don't include dos.h and dosfns.h.

	* process.c (sys_select):
	* msdos.c (sys_select): Accept one more argument and ignore it.

	* msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
	adapt data types and code to that.

	* dosfns.c:
	* msdos.c (gettime, settime): Define away the prototypes in dos.h,
	which clashes with the gnulib function of the same name.

1563 1564
2012-06-30  Andreas Schwab  <schwab@linux-m68k.org>

1565 1566 1567 1568
	* font.c (font_style_to_value, font_style_symbolic)
	(font_prop_validate_style): Add type checks for values in
	font_style_table.

1569 1570 1571 1572 1573
	* lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
	argument.
	* character.c, charset.c, menu.c, process.c, window.c: Adjust all
	uses.

1574 1575
2012-06-29  Eli Zaretskii  <eliz@gnu.org>

1576 1577
	* xdisp.c (try_window_id): Undo last change.

1578 1579