ChangeLog 564 KB
Newer Older
1 2 3 4 5 6 7 8
2012-07-29  Paul Eggert  <eggert@cs.ucla.edu>

	Don't use the abbreviation "win" to refer to Windows (Bug#10421).
	* regex.c (MAX_BUF_SIZE): Remove some incorrect and
	long-ago-commented-out code that talks about "WIN32".
	* w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
	All uses changed.

9 10 11 12 13 14 15 16 17 18 19 20
2012-07-28  Paul Eggert  <eggert@cs.ucla.edu>

	Use Gnulib stdalign module (Bug#9772, Bug#9960).
	* alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
	Simplify by using alignof.
	(pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
	* lisp.h: Include <stdalign.h>.
	(GCALIGNMENT): New macro and constant.
	(DECL_ALIGN): Remove.  All uses replaced by alignas (GCALIGNMENT).
	(USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
	(stdalign): New macro, if not already defined.

Eli Zaretskii's avatar
Eli Zaretskii committed
21 22
2012-07-28  Eli Zaretskii  <eliz@gnu.org>

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
	Fix non-ASCII input in non-GUI frames on MS-Windows.  (Bug#12055)
	* w32inevt.c: Include w32inevt.h.
	(w32_read_console_input): New inline function, calls either
	ReadConsoleInputA or ReadConsoleInputW, depending on the value of
	w32_console_unicode_input.
	(fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
	(w32_kbd_patch_key, key_event): Use the codepage returned by
	GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
	(key_event): use uChar.UnicodeChar only if
	w32_console_unicode_input is non-zero.

	* w32console.c: Include w32heap.h.
	<w32_console_unicode_input>: New global variable.
	(initialize_w32_display): Set w32_console_unicode_input to 1 on NT
	family of Windows, zero otherwise.

	* w32inevt.h: Declare w32_console_unicode_input.

Eli Zaretskii's avatar
Eli Zaretskii committed
41 42 43
	* xdisp.c (init_iterator): Don't reference tip_frame in a build
	--without-x.  (Bug#11742)

44 45 46 47 48 49 50
2012-07-27  Paul Eggert  <eggert@cs.ucla.edu>

	Adjust GDB to reflect pvec_type changes (Bug#12036).
	* .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
	2012-07-04 changes to pseudovector representation.  Problem
	reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.

Michael Albinus's avatar
Michael Albinus committed
51
2012-07-27  Michael Albinus  <michael.albinus@gmx.de>
52 53 54 55 56

	* dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
	bus address.
	(xd_close_bus, Fdbus_init_bus): Handle reference counter properly.

57 58
2012-07-27  Eli Zaretskii  <eliz@gnu.org>

59 60 61
	* alloc.c (listn): Fix the order the arguments are consed onto the
	list.

62 63 64 65 66
	* lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
	enumeration constants, as PURE and HEAP are too general, and clash
	with other headers and sources, such as gmalloc.c and the
	MS-Windows system headers.  All users changed.

67 68 69 70 71 72
2012-07-27  Dmitry Antipov  <dmantipov@yandex.ru>

	Revert last save_excursion_save and save_excursion_restore changes.
	* alloc.c, editfns.c, marker.c, lisp.h: Revert.
	Lots of crashes reported by Chong Yidong <cyd@gnu.org>.

73 74 75 76 77
2012-07-27  Dmitry Antipov  <dmantipov@yandex.ru>

	Fix recently-introduced typos in Windows port.
	Reported by Martin Rudalics <rudalics@gmx.at>.
	* w32.c (init_environment): Replace comma with semicolon.
78
	* w32fns.c (syms_of_w32fns): Add missing parenthesis.
79

Paul Eggert's avatar
Paul Eggert committed
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
2012-07-27  Paul Eggert  <eggert@cs.ucla.edu>

	Improve GDB symbol export (Bug#12036).
	* .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
	arms of an 'if', not using conditional expressions; otherwise GDB
	complains about the types in the unevaluated arm when the argument
	is an integer literal.
	(xgetint): Simplify expression.
	* alloc.c (gdb_make_enums_visible): New constant.  This ports to
	GCC 3.4.2 the export of symbols to GDB.  Problem reported by Eli
	Zaretskii in <http://bugs.gnu.org/12036#13>.
	* lisp.h (PUBLISH_TO_GDB): Remove.  All uses removed.  No longer
	needed now that we have gdb_make_enums_visible.
	(enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
	(enum enum_USE_LSB_TAG):
	New enum types, packaging up enums that need to be exported to GDB.

97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
2012-07-27  Dmitry Antipov  <dmantipov@yandex.ru>

	Utility function to make a list from specified amount of objects.
	* lisp.h (enum constype): New datatype.
	(listn): New prototype.
	* alloc.c (listn): New function.
	(Fmemory_use_count, syms_of_alloc): Use it.
	* buffer.c (syms_of_buffer): Likewise.
	* callint.c (syms_of_callint): Likewise.
	* charset.c (define_charset_internal): Likewise.
	* coding.c (syms_of_coding): Likewise.
	* keymap.c (syms_of_keymap): Likewise.
	* search.c (syms_of_search): Likewise.
	* syntax.c (syms_of_syntax): Likewise.
	* w32.c (init_environment): Likewise.
	* w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
	* xdisp.c (syms_of_xdisp): Likewise.
	* xfns.c (syms_of_xfns): Likewise.

116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
2012-07-27  Dmitry Antipov  <dmantipov@yandex.ru>

	Fast save_excursion_save and save_excursion_restore.
	* lisp.h (struct Lisp_Excursion): New data type.
	(PVEC_EXCURSION): New pseudovector type.
	(XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
	to deal with it.  Adjust comments.
	(init_marker, attach_marker): New prototype.
	(unchain_marker): Adjust prototype.
	* marker.c (attach_marker): Change to global.
	(init_marker): New function.
	* alloc.c (Fmake_marker, build_marker): Use it.
	(build_marker): More easserts.
	(mark_object): Handle struct Lisp_Excursion.
	* editfns.c (save_excursion_save, save_excursion_restore):
	Reimplement to use struct Lisp_Excursion.  Add comments.

Paul Eggert's avatar
Paul Eggert committed
133 134 135 136 137 138 139 140 141
2012-07-26  Paul Eggert  <eggert@cs.ucla.edu>

	Fix export of symbols to GDB (Bug#12036).
	* alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
	(ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
	emacs.c, as this is a more-suitable home.  Had this been done earlier
	the fix for 12036 would have avoided some of the problems noted in
	<http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
	would have been more obvious.
142 143
	* emacs.c: Do not include <verify.h>; no longer needed.
	(gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
Paul Eggert's avatar
Paul Eggert committed
144 145 146 147 148 149 150 151 152 153 154
	(gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
	(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
	Remove; now done in lisp.h.
	* lisp.h (PUBLISH_TO_GDB): New macro.
	(GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
	(DATA_SEG_BITS): Use it.
	(GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
	(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
	* mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
	not be usable in #if.  This simplifies things.

155 156 157 158
2012-07-26  Juanma Barranquero  <lekktu@gmail.com>

	* makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.

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

161
	Simplify export of symbols to GDB (Bug#12036).
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
	* .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
	$bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
	(xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
	Adjust to changes in lisp.h and emacs.c, by using
	CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
	of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
	INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
	gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
	instead of gdb_valbits.
	(xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
	PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
	instead of gdb_array_mark_flag.
	(xboolvector): Get size from $->size, not $->header.size.
	Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
	(xreload, hook-run, hookpost-run): Remove.
	* emacs.c: Include <verify.h>.
	(gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
	(gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
	Remove.
	(gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
	(gdb_USE_LSB_TAG): New enum constants.
	(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
	Also define these as enum constants, so they're visible to GDB.
	(ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
	(ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
	as constants, so they're visible to GDB.
	* lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
	(PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
	Now enum constants, not macros, so they're visible to GDB.
	(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
	more convenient now.  All uses changed.
	(VALMASK) [USE_LSB_TAG]: Also define in this case.
	* mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.

196 197 198 199 200
2012-07-26  Dmitry Antipov  <dmantipov@yandex.ru>

	Explicitly free restriction data that are not needed anymore.
	* editfns.c (save_restriction_restore): Free restriction data.

201 202 203 204 205
2012-07-26  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
	add argument, tune behavior, and adjust all callers.

206 207 208 209 210 211 212 213 214
2012-07-25  Paul Eggert  <eggert@cs.ucla.edu>

	Use typedef for EMACS_INT, EMACS_UINT.
	* lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
	than macros.  This simplifies debugging in the usual case, since
	it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
	and it allows expressions involving EMACS_INT casts.
	* .gdbinit (xreload): Simplify by using EMACS_INT cast.

215 216 217 218 219
2012-07-25  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (ns_read_socket): Return early if there is a modal
	window (Bug#12043).

220 221 222 223 224
2012-07-25  Martin Rudalics  <rudalics@gmx.at>

	* frame.c (Fredirect_frame_focus): In doc-string don't mention
	that FOCUS-FRAME can be omitted.

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

	Adjust buffer text indirection counters at the end of Fkill_buffer.
	* buffer.c (Fkill_buffer): Adjust indirection counters when the
	buffer is definitely dead.  This should really fix an issue reported
	by Christoph Scholtes again.  (Bug#12007).
	(init_buffer_once): Initialize indirection counters of
	buffer_defaults and buffer_local_symbols (for sanity and safety).

234 235 236 237 238 239
2012-07-24  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (init_iterator): Don't compute dimensions of truncation
	and continuation glyphs on tooltip frames, leave them at zero.
	Avoids continued lines in tooltips.  (Bug#11832)

Dmitry Antipov's avatar
Dmitry Antipov committed
240 241 242
2012-07-24  Dmitry Antipov  <dmantipov@yandex.ru>

	Simplify copy_overlay.
243
	* buffer.c (copy_overlay): Simplify.  Use build_marker.
Dmitry Antipov's avatar
Dmitry Antipov committed
244 245
	* lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.

246 247 248 249 250 251 252 253
2012-07-23  Eli Zaretskii  <eliz@gnu.org>

	* print.c (print_object): Don't crash when a frame's name is nil
	or invalid.  (Bug#12025)

	* window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
	it signals an error when a tooltip frame is being created.

254 255 256 257 258 259 260 261 262 263 264 265
2012-07-23  Dmitry Antipov  <dmantipov@yandex.ru>

	Cleanup miscellaneous objects allocation and initialization.
	* alloc.c (allocate_misc): Change to static.  Add argument to
	specify the subtype.  Adjust comment and users.
	(build_overlay): New function.
	* buffer.c (copy_overlays, Fmake_overlay): Use it.
	* lisp.h (struct Lisp_Overlay): Remove obsolete comment.
	(allocate_misc): Remove prototype.
	(build_overlay): Add prototype.

2012-07-23  Dmitry Antipov  <dmantipov@yandex.ru>
266 267 268 269 270 271

	Swap buffer text indirection counters in Fbuffer_swap_text.
	* buffer.c (Fbuffer_swap_text): Swap indirections too.
	This avoids crash reported by Christoph Scholtes at
	http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.

272 273 274 275 276 277 278 279 280 281
2012-07-22  Jan Djärv  <jan.h.d@swipnet.se>

	* nsmenu.m (Popdown_data): New struct.
	(pop_down_menu): p->pointer is Popdown_data.  Release the pool and
	free Popdown_data.
	(ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
	(initWithContentRect): Make imgView and contentView non-static
	and autorelease them.  Also autorelease img and matrix (Bug#12005).
	(dealloc): Remove (Bug#12005).

282 283 284 285 286 287 288
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.

289 290 291 292 293 294 295 296
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.

297 298 299 300 301
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.

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

304 305 306 307 308
	* 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.

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

313 314 315
2012-07-21  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
316
	(conversationIdentifier): Return value is NSInteger.
317
	* nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
318

319 320 321 322 323
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).

324 325 326 327 328 329 330 331 332 333 334
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.

335 336 337 338 339 340 341 342 343 344 345
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
346 347 348 349 350 351 352 353 354 355 356 357
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.

358 359 360 361 362 363 364 365 366 367 368
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.

369 370 371 372 373 374 375 376 377 378 379 380 381 382
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.

383 384 385 386 387 388 389 390 391
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.

392 393 394 395
2012-07-19  Stefan Monnier  <monnier@iro.umontreal.ca>

	* alloc.c (Fgarbage_collect): Tweak docstring.

396 397 398 399 400 401 402 403 404 405 406 407 408
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
409 410 411 412 413 414 415 416 417
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.

418 419 420 421 422 423 424 425 426 427 428 429 430 431
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.

432 433 434 435 436 437 438 439
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>.

440 441
2012-07-18  Paul Eggert  <eggert@cs.ucla.edu>

442 443 444 445
	* 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.

446 447 448 449 450 451 452 453 454
	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 ().

455 456
2012-07-18  Stefan Monnier  <monnier@iro.umontreal.ca>

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

460 461 462 463 464
	* 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).

465 466 467 468 469
2012-07-18  Andreas Schwab  <schwab@linux-m68k.org>

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

470 471 472 473 474 475
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.

476 477 478 479 480
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).

481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500
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.

501 502 503 504 505
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.

506 507 508 509 510 511 512 513
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
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
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.

544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559
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
560 561 562 563
2012-07-17  Chong Yidong  <cyd@gnu.org>

	* editfns.c (Finsert_char): Doc fix.

564 565 566 567 568 569 570 571 572 573 574
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.

575 576 577 578 579 580 581 582 583
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
584 585 586 587 588 589 590 591
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.

592 593 594 595 596 597
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.

598 599 600 601 602 603
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.

604 605 606 607 608
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).

609 610 611 612 613 614 615 616 617 618 619 620
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
621 622 623 624 625 626
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.

627 628 629 630 631 632 633
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)

634 635 636 637 638 639 640
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.

641 642 643 644 645 646 647 648 649 650 651 652 653 654 655
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.

656 657 658 659 660 661 662 663 664 665 666
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.

667 668 669 670
2012-07-15  Leo Liu  <sdl.web@gmail.com>

	* fringe.c: Fix typo in comments.

Leo Liu's avatar
Leo Liu committed
671 672 673 674
2012-07-14  Leo Liu  <sdl.web@gmail.com>

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

675 676 677 678 679 680 681 682 683 684
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.

685 686 687 688
2012-07-14  Juanma Barranquero  <lekktu@gmail.com>

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

689 690 691 692 693 694
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.

695 696
2012-07-13  Glenn Morris  <rgm@gnu.org>

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

699 700 701
	* 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.

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

704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775
	* 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.

776 777 778
	* nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
	memcpy (Bug#11907).

Juanma Barranquero's avatar
Juanma Barranquero committed
779
2012-07-13  Kalle Kankare  <kalle.kankare@iki.fi>  (tiny change)
780 781 782 783

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

784 785 786 787 788 789
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.

790 791 792 793 794 795
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)

796 797 798 799 800
2012-07-13  Paul Eggert  <eggert@cs.ucla.edu>

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

801 802
2012-07-13  Glenn Morris  <rgm@gnu.org>

803 804 805
	* s/bsd-common, s/cygwin.h: Remove empty files.
	* s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.

806 807 808 809 810 811 812 813 814 815 816 817
	* 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
818
2012-07-13  BT Templeton  <bpt@hcoop.net>  (tiny change)
819 820 821

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

822 823
2012-07-13  Glenn Morris  <rgm@gnu.org>

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

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

828 829 830
	* process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
	* s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.

831 832
2012-07-12  Glenn Morris  <rgm@gnu.org>

833
	* s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
834 835 836 837 838 839 840

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

841 842 843 844 845 846 847 848 849 850 851 852 853 854
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)

855 856
2012-07-12  Glenn Morris  <rgm@gnu.org>

857 858 859 860 861
	* 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.

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

Paul Eggert's avatar
Paul Eggert committed
864 865 866 867 868 869 870 871
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.

872 873
2012-07-12  Glenn Morris  <rgm@gnu.org>

874 875 876 877 878
	* 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.

879 880 881
	* s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
	Move PTY_OPEN to configure.

882 883 884 885
	* 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.

886 887 888 889 890 891 892
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.

893 894
2012-07-12  Glenn Morris  <rgm@gnu.org>

895 896
	* s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
	* s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
897 898 899 900 901 902 903 904
	* 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.

905
	* s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
906
	(BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
907 908

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

910 911 912
	* s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
	* s/template.h: Move NARROWPROTO to configure.

913 914
2012-07-11  Glenn Morris  <rgm@gnu.org>

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

918 919 920 921
	* 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.

922 923 924 925
2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>

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

926 927 928 929 930
2012-07-11  Glenn Morris  <rgm@gnu.org>

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

931 932 933 934 935 936
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.
937 938
	* lread.c (intern_1, intern_c_string_1, oblookup): Simplify
	Vobarray checking.
939 940 941
	* font.c (font_intern_prop): Likewise.  Adjust comment.
	* w32font.c (intern_font_name): Likewise.

942 943
2012-07-11  Andreas Schwab  <schwab@linux-m68k.org>

944 945
	* gnutls.c (Fgnutls_boot): Properly parse :keylist argument.

946 947 948 949 950 951 952 953 954 955
	* 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.

956 957
2012-07-11  Glenn Morris  <rgm@gnu.org>

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

961 962 963
	* 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.

964 965 966 967
	* 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
968 969
	* s/gnu.h: Remove file, which is now empty.

970 971 972
	* s/gnu.h, s/gnu-linux.h:
	Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.

973 974 975 976 977 978
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.

979 980 981 982 983 984 985
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
986 987
2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>

Paul Eggert's avatar
Paul Eggert committed
988 989 990 991
	Assume mkdir, rmdir.
	* sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
	* sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.

Paul Eggert's avatar
Paul Eggert committed
992 993 994
	Assume rename.
	* sysdep.c (rename) [!HAVE_RENAME]: Remove.

Paul Eggert's avatar
Paul Eggert committed
995 996 997 998 999
	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
1000 1001 1002
	Assume strerror.
	* sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.

1003 1004 1005 1006
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)
1007
	(font_open_by_name): Change to use length argument.  Adjust
1008
	users accordingly.
1009 1010 1011 1012
	* 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.
1013 1014 1015 1016
	(xfont_list_pattern, xfont_match): Use length returned by
	xfont_decode_coding_xlfd.
	* xfns.c (x_default_font_parameter): Omit useless xstrdup.

1017 1018
2012-07-11  Glenn Morris  <rgm@gnu.org>

1019 1020 1021
	* s/darwin.h, s/freebsd.h, s/netbsd.h:
	Move DONT_REOPEN_PTY to configure.

1022 1023 1024
	* sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
	* s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.

1025 1026
2012-07-10  Paul Eggert  <eggert@cs.ucla.edu>

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

1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051
	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
1052
	* atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
1053 1054 1055 1056
	* 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.

1057 1058
	* bytecode.c (targets): Suppress -Woverride-init warnings.

1059 1060 1061 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
	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.

1091 1092 1093 1094 1095
2012-07-10  Glenn Morris  <rgm@gnu.org>

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

1096 1097 1098 1099 1100
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,
1101
	* w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
1102 1103
	where argument type is known to be a Lisp_Cons.

Tom Tromey's avatar
Tom Tromey committed
1104 1105 1106 1107 1108 1109 1110 1111
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.

1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125
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.

1126 1127 1128 1129 1130 1131 1132
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.

1133 1134 1135 1136 1137 1138 1139
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,
1140
	swap 1st and 2nd arguments to obey the common convention.  Adjust
1141 1142 1143
	users accordingly.
	* filelock.c (fill_in_lock_file_name): Avoid calls to strlen.

1144 1145
2012-07-10  Glenn Morris  <rgm@gnu.org>

1146 1147 1148
	* s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
	Move PENDING_OUTPUT_COUNT definition to configure.

1149 1150 1151 1152
	* 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.

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

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

1159 1160 1161 1162 1163 1164 1165 1166
	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.

1167 1168
2012-07-09  Glenn Morris  <rgm@gnu.org>

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

1172 1173 1174 1175 1176 1177 1178
	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.

1179 1180
	* nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.

1181 1182
2012-07-09  Paul Eggert  <eggert@cs.ucla.edu>

1183 1184 1185
	* process.c (wait_reading_process_output): 'waitchannels' was unset
	when read_kbd || !NILP (wait_for_cell); fix this.

1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199
	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.

1200 1201 1202 1203 1204
	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.

1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222
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.

1223 1224 1225 1226 1227 1228 1229 1230 1231
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.

1232 1233 1234 1235 1236 1237 1238 1239 1240
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.

1241 1242 1243 1244 1245
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>.

1246 1247 1248 1249
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)
1250 1251 1252 1253 1254 1255 1256 1257
	(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.
1258

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

1261 1262 1263
	* xdisp.c (display_line): Avoid warning about implicit declaration
	of FRAME_FONT.

1264 1265
	* frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.

1266 1267
	* lisp.h: Remove empty conditional.

1268 1269
2012-07-07  Paul Eggert  <eggert@cs.ucla.edu>

1270 1271
	* lread.c (load_path_check): Now static.

1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288
	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.

1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299
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.

1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321
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.

1322 1323
2012-07-07  Paul Eggert  <eggert@cs.ucla.edu>

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

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

1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339
	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.

1340 1341 1342 1343 1344 1345
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).

1346 1347 1348 1349 1350 1351 1352
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.

1353 1354
2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>

1355 1356 1357 1358 1359 1360 1361
	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.

1362 1363
	* xfont.c (compare_font_names): Redo to omit the need for casts.

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

1366 1367 1368
	* xfns.c (Fx_change_window_property): Doc fix.
	* w32fns.c (Fx_change_window_property): Doc fix.

Andreas Schwab's avatar
Andreas Schwab committed
1369 1370 1371 1372
	* 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
1373
2012-07-06  Juanma Barranquero  <lekktu@gmail.com>
1374 1375 1376 1377 1378 1379
	    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.

1380 1381 1382 1383 1384 1385 1386
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.

1387 1388 1389 1390 1391
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
1392 1393 1394 1395 1396
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
1397 1398
	(buf_charpos_to_bytepos, buf_bytepos_to_charpos):
	Call byte_char_debug_check with correct arguments.
Dmitry Antipov's avatar
Dmitry Antipov committed
1399

1400 1401 1402
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
1403 1404
	* marker.c (byte_char_debug_check, count_markers):
	Use only if ENABLE_CHECKING is defined.
1405 1406 1407 1408
	(byte_debug_flag): Remove.
	(CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
	Always call byte_char_debug_check if ENABLE_CHECKING is defined.

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

1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422
	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.
1423
	* buffer.c (unchain_overlay): Simplify.  Add comment.
1424
	* marker.c (unchain_marker): Simplify.  Fix comments.
1425

1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438
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.

1439 1440 1441 1442 1443 1444 1445 1446
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
1447 1448 1449 1450 1451 1452 1453 1454 1455 1456
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.

1457 1458 1459 1460
2012-07-06  Glenn Morris  <rgm@gnu.org>

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

1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485
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.

1486 1487 1488 1489 1490 1491 1492
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.

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

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

1498 1499 1500 1501
2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>

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

1502 1503 1504 1505 1506 1507 1508 1509 1510
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
1511 1512
	(update_theme_scrollbar_width, xg_create_scroll_bar):
	Use gtk_scrollbar_new (Bug#11768).
1513 1514 1515
	(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
1516
	(xg_initialize): Get settings by calling gtk_settings_get_for_screen
1517 1518
	with default display (Bug#11768).

1519 1520 1521 1522 1523 1524 1525
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)

1526 1527 1528 1529 1530
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
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 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586
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.

1587 1588 1589 1590 1591 1592
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>.

1593 1594
2012-07-04  Paul Eggert  <eggert@cs.ucla.edu>

1595 1596 1597 1598 1599
	* 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.

1600 1601 1602 1603
	* 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>.

<