ChangeLog 566 KB
Newer Older
1 2 3 4 5
2012-07-29  Juanma Barranquero  <lekktu@gmail.com>

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

6 7 8 9 10 11 12
2012-07-29  Dmitry Antipov  <dmantipov@yandex.ru>

	Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
	* lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
	time.  Adjust users.
	(CHECK_CONS_LIST): Remove.  Convert all users to check_cons_list.

13 14 15 16 17
2012-07-29  Jan Djärv  <jan.h.d@swipnet.se>

	* lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
	setting sitelisp (Bug#12010).

Eli Zaretskii's avatar
Eli Zaretskii committed
18 19 20 21 22 23 24 25
2012-07-29  Eli Zaretskii  <eliz@gnu.org>

	* w32heap.h (OS_9X): Renamed from OS_WINDOWS_95.

	* w32heap.c (cache_system_info):
	* w32.c (sys_rename):
	* w32proc.c (find_child_console, sys_kill): All users changed.

26 27 28 29
2012-07-29  Paul Eggert  <eggert@cs.ucla.edu>

	* alloc.c (Fgarbage_collect): Indent as per usual Emacs style.

30 31 32 33
2012-07-29  Eli Zaretskii  <eliz@gnu.org>

	* makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.

34 35 36 37 38 39
2012-07-29  Dmitry Antipov  <dmantipov@yandex.ru>

	Cleanup statistics calculation in Fgarbage_collect.
	* alloc.c (Fgarbage_collect): Rename t1 to meaningful start.  Fix
	zombies percentage calculation.  Simplify elapsed time calculation.

40 41 42 43 44 45 46 47 48
2012-07-29  Dmitry Antipov  <dmantipov@yandex.ru>

	Generalize marker debugging code under MARKER_DEBUG and use eassert.
	* insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
	(gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
	(insert_from_string_1, insert_from_gap, insert_from_buffer_1)
	(replace_range, replace_range_2, del_range_2): Change to eassert.
	* marker.c (byte_char_debug_check): Adjust style.

49 50 51 52 53 54 55 56
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.

57 58 59 60 61 62 63 64 65 66 67 68
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
69 70
2012-07-28  Eli Zaretskii  <eliz@gnu.org>

71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
	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
89 90 91
	* xdisp.c (init_iterator): Don't reference tip_frame in a build
	--without-x.  (Bug#11742)

92 93 94 95 96 97 98
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
99
2012-07-27  Michael Albinus  <michael.albinus@gmx.de>
100 101 102 103 104

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

105 106
2012-07-27  Eli Zaretskii  <eliz@gnu.org>

107 108 109
	* alloc.c (listn): Fix the order the arguments are consed onto the
	list.

110 111 112 113 114
	* 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.

115 116 117 118 119 120
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>.

121 122 123 124 125
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.
126
	* w32fns.c (syms_of_w32fns): Add missing parenthesis.
127

Paul Eggert's avatar
Paul Eggert committed
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
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.

145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
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.

164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
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
181 182 183 184 185 186 187 188 189
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.
190 191
	* 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
192 193 194 195 196 197 198 199 200 201 202
	(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.

203 204 205 206
2012-07-26  Juanma Barranquero  <lekktu@gmail.com>

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

207 208
2012-07-26  Paul Eggert  <eggert@cs.ucla.edu>

209
	Simplify export of symbols to GDB (Bug#12036).
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243
	* .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.

244 245 246 247 248
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.

249 250 251 252 253
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.

254 255 256 257 258 259 260 261 262
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.

263 264 265 266 267
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).

268 269 270 271 272
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.

273 274 275 276 277 278 279 280 281
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).

282 283 284 285 286 287
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
288 289 290
2012-07-24  Dmitry Antipov  <dmantipov@yandex.ru>

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

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

302 303 304 305 306 307 308 309 310 311 312 313
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>
314 315 316 317 318 319

	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.

320 321 322 323 324 325 326 327 328 329
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).

330 331 332 333 334 335 336
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.

337 338 339 340 341 342 343 344
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.

345 346 347 348 349
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.

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

352 353 354 355 356
	* 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.

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

361 362 363
2012-07-21  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
364
	(conversationIdentifier): Return value is NSInteger.
365
	* nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
366

367 368 369 370 371
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).

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

383 384 385 386 387 388 389 390 391 392 393
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
394 395 396 397 398 399 400 401 402 403 404 405
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.

406 407 408 409 410 411 412 413 414 415 416
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.

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

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

440 441 442 443
2012-07-19  Stefan Monnier  <monnier@iro.umontreal.ca>

	* alloc.c (Fgarbage_collect): Tweak docstring.

444 445 446 447 448 449 450 451 452 453 454 455 456
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
457 458 459 460 461 462 463 464 465
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.

466 467 468 469 470 471 472 473 474 475 476 477 478 479
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.

480 481 482 483 484 485 486 487
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>.

488 489
2012-07-18  Paul Eggert  <eggert@cs.ucla.edu>

490 491 492 493
	* 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.

494 495 496 497 498 499 500 501 502
	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 ().

503 504
2012-07-18  Stefan Monnier  <monnier@iro.umontreal.ca>

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

508 509 510 511 512
	* 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).

513 514 515 516 517
2012-07-18  Andreas Schwab  <schwab@linux-m68k.org>

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

518 519 520 521 522 523
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.

524 525 526 527 528
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).

529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548
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.

549 550 551 552 553
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.

554 555 556 557 558 559 560 561
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
562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591
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.

592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607
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
608 609 610 611
2012-07-17  Chong Yidong  <cyd@gnu.org>

	* editfns.c (Finsert_char): Doc fix.

612 613 614 615 616 617 618 619 620 621 622
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.

623 624 625 626 627 628 629 630 631
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
632 633 634 635 636 637 638 639
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.

640 641 642 643 644 645
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.

646 647 648 649 650 651
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.

652 653 654 655 656
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).

657 658 659 660 661 662 663 664 665 666 667 668
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
669 670 671 672 673 674
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.

675 676 677 678 679 680 681
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)

682 683 684 685 686 687 688
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.

689 690 691 692 693 694 695 696 697 698 699 700 701 702 703
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.

704 705 706 707 708 709 710 711 712 713 714
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.

715 716 717 718
2012-07-15  Leo Liu  <sdl.web@gmail.com>

	* fringe.c: Fix typo in comments.

Leo Liu's avatar
Leo Liu committed
719 720 721 722
2012-07-14  Leo Liu  <sdl.web@gmail.com>

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

723 724 725 726 727 728 729 730 731 732
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.

733 734 735 736
2012-07-14  Juanma Barranquero  <lekktu@gmail.com>

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

737 738 739 740 741 742
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.

743 744
2012-07-13  Glenn Morris  <rgm@gnu.org>

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

747 748 749
	* 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.

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

752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 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 810 811 812 813 814 815 816 817 818 819 820 821 822 823
	* 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.

824 825 826
	* nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
	memcpy (Bug#11907).

Juanma Barranquero's avatar
Juanma Barranquero committed
827
2012-07-13  Kalle Kankare  <kalle.kankare@iki.fi>  (tiny change)
828 829 830 831

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

832 833 834 835 836 837
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.

838 839 840 841 842 843
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)

844 845 846 847 848
2012-07-13  Paul Eggert  <eggert@cs.ucla.edu>

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

849 850
2012-07-13  Glenn Morris  <rgm@gnu.org>

851 852 853
	* s/bsd-common, s/cygwin.h: Remove empty files.
	* s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.

854 855 856 857 858 859 860 861 862 863 864 865
	* 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
866
2012-07-13  BT Templeton  <bpt@hcoop.net>  (tiny change)
867 868 869

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

870 871
2012-07-13  Glenn Morris  <rgm@gnu.org>

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

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

876 877 878
	* process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
	* s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.

879 880
2012-07-12  Glenn Morris  <rgm@gnu.org>

881
	* s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
882 883 884 885 886 887 888

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

889 890 891 892 893 894 895 896 897 898 899 900 901 902
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)

903 904
2012-07-12  Glenn Morris  <rgm@gnu.org>

905 906 907 908 909
	* 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.

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

Paul Eggert's avatar
Paul Eggert committed
912 913 914 915 916 917 918 919
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.

920 921
2012-07-12  Glenn Morris  <rgm@gnu.org>

922 923 924 925 926
	* 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.

927 928 929
	* s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
	Move PTY_OPEN to configure.

930 931 932 933
	* 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.

934 935 936 937 938 939 940
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.

941 942
2012-07-12  Glenn Morris  <rgm@gnu.org>

943 944
	* s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
	* s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
945 946 947 948 949 950 951 952
	* 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.

953
	* s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
954
	(BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
955 956

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

958 959 960
	* s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
	* s/template.h: Move NARROWPROTO to configure.

961 962
2012-07-11  Glenn Morris  <rgm@gnu.org>

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

966 967 968 969
	* 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.

970 971 972 973
2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>

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

974 975 976 977 978
2012-07-11  Glenn Morris  <rgm@gnu.org>

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

979 980 981 982 983 984
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.
985 986
	* lread.c (intern_1, intern_c_string_1, oblookup): Simplify
	Vobarray checking.
987 988 989
	* font.c (font_intern_prop): Likewise.  Adjust comment.
	* w32font.c (intern_font_name): Likewise.

990 991
2012-07-11  Andreas Schwab  <schwab@linux-m68k.org>

992 993
	* gnutls.c (Fgnutls_boot): Properly parse :keylist argument.

994 995 996 997 998 999 1000 1001 1002 1003
	* 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.

1004 1005
2012-07-11  Glenn Morris  <rgm@gnu.org>

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

1009 1010 1011
	* 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.

1012 1013 1014 1015
	* 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
1016 1017
	* s/gnu.h: Remove file, which is now empty.

1018 1019 1020
	* s/gnu.h, s/gnu-linux.h:
	Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.

1021 1022 1023 1024 1025 1026
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.

1027 1028 1029 1030 1031 1032 1033
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
1034 1035
2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>

Paul Eggert's avatar
Paul Eggert committed
1036 1037 1038 1039
	Assume mkdir, rmdir.
	* sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
	* sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.

Paul Eggert's avatar
Paul Eggert committed
1040 1041 1042
	Assume rename.
	* sysdep.c (rename) [!HAVE_RENAME]: Remove.

Paul Eggert's avatar
Paul Eggert committed
1043 1044 1045 1046 1047
	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
1048 1049 1050
	Assume strerror.
	* sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.

1051 1052 1053 1054
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)
1055
	(font_open_by_name): Change to use length argument.  Adjust
1056
	users accordingly.
1057 1058 1059 1060
	* 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.
1061 1062 1063 1064
	(xfont_list_pattern, xfont_match): Use length returned by
	xfont_decode_coding_xlfd.
	* xfns.c (x_default_font_parameter): Omit useless xstrdup.

1065 1066
2012-07-11  Glenn Morris  <rgm@gnu.org>

1067 1068 1069
	* s/darwin.h, s/freebsd.h, s/netbsd.h:
	Move DONT_REOPEN_PTY to configure.

1070 1071 1072
	* sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
	* s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.

1073 1074
2012-07-10  Paul Eggert  <eggert@cs.ucla.edu>

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

1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099
	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
1100
	* atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
1101 1102 1103 1104
	* 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.

1105 1106
	* bytecode.c (targets): Suppress -Woverride-init warnings.

1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138
	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.

1139 1140 1141 1142 1143
2012-07-10  Glenn Morris  <rgm@gnu.org>

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

1144 1145 1146 1147 1148
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,
1149
	* w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
1150 1151
	where argument type is known to be a Lisp_Cons.

Tom Tromey's avatar
Tom Tromey committed
1152 1153 1154 1155 1156 1157 1158 1159
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.

1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173
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.

1174 1175 1176 1177 1178 1179 1180
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.

1181 1182 1183 1184 1185 1186 1187
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,
1188
	swap 1st and 2nd arguments to obey the common convention.  Adjust
1189 1190 1191
	users accordingly.
	* filelock.c (fill_in_lock_file_name): Avoid calls to strlen.

1192 1193
2012-07-10  Glenn Morris  <rgm@gnu.org>

1194 1195 1196
	* s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
	Move PENDING_OUTPUT_COUNT definition to configure.

1197 1198 1199 1200
	* 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.

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

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

1207 1208 1209 1210 1211 1212 1213 1214
	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.

1215 1216
2012-07-09  Glenn Morris  <rgm@gnu.org>

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

1220 1221 1222 1223 1224 1225 1226
	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.

1227 1228
	* nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.

1229 1230
2012-07-09  Paul Eggert  <eggert@cs.ucla.edu>

1231 1232 1233
	* process.c (wait_reading_process_output): 'waitchannels' was unset
	when read_kbd || !NILP (wait_for_cell); fix this.

1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247
	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.

1248 1249 1250 1251 1252
	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.

1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270
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.

1271 1272 1273 1274 1275 1276 1277 1278 1279
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.

1280 1281 1282 1283 1284 1285 1286 1287 1288
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.

1289 1290 1291 1292 1293
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>.

1294 1295 1296 1297
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)
1298 1299 1300 1301 1302 1303 1304 1305
	(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.
1306

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

1309 1310 1311
	* xdisp.c (display_line): Avoid warning about implicit declaration
	of FRAME_FONT.

1312 1313
	* frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.

1314 1315
	* lisp.h: Remove empty conditional.

1316 1317
2012-07-07  Paul Eggert  <eggert@cs.ucla.edu>

1318 1319
	* lread.c (load_path_check): Now static.

1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336
	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.

1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347
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.

1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369
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.

1370 1371
2012-07-07  Paul Eggert  <eggert@cs.ucla.edu>

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

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

1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387
	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.

1388 1389 1390 1391 1392 1393
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).

1394 1395 1396 1397 1398 1399 1400
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.

1401 1402
2012-07-06  Paul Eggert  <eggert@cs.ucla.edu>

1403 1404 1405 1406 1407 1408 1409
	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.

1410 1411
	* xfont.c (compare_font_names): Redo to omit the need for casts.

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

1414 1415 1416
	* xfns.c (Fx_change_window_property): Doc fix.
	* w32fns.c (Fx_change_window_property): Doc fix.

Andreas Schwab's avatar
Andreas Schwab committed
1417 1418 1419 1420
	* 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
1421
2012-07-06  Juanma Barranquero  <lekktu@gmail.com>
1422 1423 1424 1425 1426 1427
	    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.

1428 1429 1430 1431 1432 1433 1434
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.

1435 1436 1437 1438 1439
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
1440 1441 1442 1443 1444
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
1445 1446
	(buf_charpos_to_bytepos, buf_bytepos_to_charpos):
	Call byte_char_debug_check with correct arguments.
Dmitry Antipov's avatar
Dmitry Antipov committed
1447

1448 1449 1450
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
1451 1452
	* marker.c (byte_char_debug_check, count_markers):
	Use only if ENABLE_CHECKING is defined.
1453 1454 1455 1456
	(byte_debug_flag): Remove.
	(CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
	Always call byte_char_debug_check if ENABLE_CHECKING is defined.

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

1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470
	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.
1471
	* buffer.c (unchain_overlay): Simplify.  Add comment.
1472
	* marker.c (unchain_marker): Simplify.  Fix comments.
1473

1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486
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.

1487 1488 1489 1490 1491 1492 1493 1494
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
1495 1496 1497 1498 1499 1500 1501 1502 1503 1504
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.

1505 1506 1507 1508
2012-07-06  Glenn Morris  <rgm@gnu.org>

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

1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533
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.

1534 1535 1536 1537 1538 1539 1540
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.

1541 1542 1543 1544 1545
2012-07-05  Dmitry Antipov  <dmantipov@yandex.ru>

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

1546 1547 1548 1549
2012-07-05  Paul Eggert  <eggert@cs.ucla.edu>

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

1550 1551 1552 1553 1554 1555 1556 1557 1558
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
1559 1560
	(update_theme_scrollbar_width, xg_create_scroll_bar):
	Use gtk_scrollbar_new (Bug#11768).
1561 1562 1563
	(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
1564
	(xg_initialize): Get settings by calling gtk_settings_get_for_screen
1565 1566
	with default display (Bug#11768).

1567 1568 1569 1570 1571 1572 1573
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)

1574 1575 1576 1577 1578
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
1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593