ChangeLog 591 KB
Newer Older
1 2 3 4 5
2014-10-31  Dmitry Antipov  <dmantipov@yandex.ru>

	* font.c (copy_font_spec): Redesign to avoid Fcopy_alist
	and unnecessary initialization.  Adjust comments.

6 7 8 9 10 11 12
2014-10-30  Eli Zaretskii  <eliz@gnu.org>

	* bidi.c (bidi_cache_reset_to): Invalidate bidi_cache_last_idx by
	setting it to -1.
	(bidi_find_bracket_pairs): Pass to bidi_cache_reset_to a relative
	index, not an absolute one, as that's what the function expects.

13 14 15 16 17
2014-10-30  Dmitry Antipov  <dmantipov@yandex.ru>

	* xfaces.c (Finternal_set_lisp_face_attribute): Don't try to realize
	font on an initial frame when running as a daemon (Bug#18869).

18 19
	* fontset.c (toplevel): Adjust comment to match 2014-06-19 change.

20
2014-10-30  Eli Zaretskii  <eliz@gnu.org>
21 22 23 24

	* fileio.c (Fexpand_file_name): Use make_unibyte_string, not
	build_string, when importing a home directory.  (Bug#18873)

25 26 27 28
	* dispnew.c (buffer_posn_from_coords): Use
	WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
	account for the header-line height.  (Bug#18839)

29 30 31 32
2014-10-28  Ulf Jasper  <ulf.jasper@web.de>

	* xml.c (parse_region): Do not forget the first document child.

33 34 35 36 37 38 39 40 41 42 43 44 45 46
2014-10-25  Jan Djärv  <jan.h.d@swipnet.se>

	* nsselect.m: pasteboard_changecount is new.
	(ns_store_pb_change_count, ns_get_pb_change_count)
	(ns_get_our_change_count_for): New functions.
	(ns_string_to_pasteboard_internal): Correct comment.
	type => gtype in eassert, Call ns_store_pb_change_count.
	(Fns_own_selection_internal): Remove data, use value (Bug#18799).
	(Fns_disown_selection_internal, Fns_selection_owner_p): Replace
	Vselection_alist check, with change count check.
	(Fns_get_selection): Initialize val to Qnil.  Only get local
	selection if change counts match (Bug#18799).
	(nxatoms_of_nsselect): Initialize pasteboard_changecount.

47 48 49 50 51
2014-10-25  Noam Postavsky  <npostavs@users.sourceforget.net>

	* src/w32proc.c (create_child): If calling a quoted batch file,
	pass NULL for exe.  (Bug#18745)

52 53 54 55 56 57
2014-10-24  Eli Zaretskii  <eliz@gnu.org>

	* bidi.c (bidi_resolve_explicit, bidi_find_bracket_pairs)
	(bidi_resolve_brackets): Use end of string position rather than ZV
	when iterating over a string.  (Bug#18815)

58 59 60 61 62 63 64
2014-10-24  Martin Rudalics  <rudalics@gmx.at>

	* keyboard.c (make_lispy_position): Return coordinates also when
	on scroll bars, fringes, margins or not in a window.
	* xdisp.c (show_mouse_face): Don't change cursor face during
	mouse tracking.

65 66 67 68 69 70
2014-10-23  Martin Rudalics  <rudalics@gmx.at>

	* frame.c (Fset_frame_height, Fset_frame_width, Fset_frame_size)
	(frame_resize_pixelwise, frame_inhibit_implied_resize): Fix
	doc-strings (Bug#18789).

71 72 73 74
2014-10-23  Paul Eggert  <eggert@cs.ucla.edu>

	* Makefile.in (ACLOCAL_INPUTS): Omit unnecessary use of 'wildcard'.

75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
2014-10-22  Eli Zaretskii  <eliz@gnu.org>

	Optimize redisplay of simple bracketed text.
	* bidi.c (bidi_cache_reset_to): New function.
	(bidi_cache_reset): Call it.
	(bidi_init_it, bidi_line_init): Initialize the bracket_pairing_pos
	member to -1.
	(bidi_resolve_explicit): Reset bracket_pairing_pos and
	bracket_enclosed_type only if bracket_pairing_pos's value is not
	ZV.
	(MAX_BPA_STACK): Make sure the value is signed.
	(PUSH_BPA_STACK): If the BPA stack overflows, don't bail out, but
	stop pushing values onto the stack.
	(bidi_find_bracket_pairs): If the bracketed text is only on the
	base embedding level, remove all the states cached by this
	function from the cache, and return zero, so that the brackets in
	this segment of text are processed as normal neutrals.
	(bidi_resolve_brackets): Detect the brackets that are to be
	processed as neutrals, and don't call bidi_find_bracket_pairs on
	them.  (Bug#18778)

96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
2014-10-21  Stefan Monnier  <monnier@iro.umontreal.ca>

	* w32select.c (Fw32_selection_exists_p): Rename from
	Fx_selection_exists_p.
	(syms_of_w32select): Adjust accordingly.

	* w16select.c (Fw16_selection_exists_p): Rename from
	Fx_selection_exists_p.
	(syms_of_win16select): Adjust accordingly.

	* nsselect.m (ns_get_local_selection): Signal error rather than `quit'.
	(Fns_own_selection_internal): Tighten scoping.
	(Fns_selection_exists_p): Rename from Fx_selection_exists_p.
	(Fns_get_selection): Rename from Fx_get_selection_internal.
	(Fns_get_selection_internal, Fns_store_selection_internal):
	Remove functions.
	(syms_of_nsselect): Adjust accordingly.

114 115 116 117 118 119 120
2014-10-21  Martin Rudalics  <rudalics@gmx.at>

	* w32fns.c (Fw32_frame_menu_bar_size): New function.
	* w32term.c (x_set_window_size): Account for wrapped menu bar
	lines when setting up frame height (Bug#15174 and Bug#18720).
	(w32_add_wrapped_menu_bar_lines): New variable.

Stefan Monnier's avatar
Stefan Monnier committed
121
2014-10-21  Stefan Monnier  <monnier@iro.umontreal.ca>
122 123 124 125

	* xdisp.c (redisplay_window): Re-run pre-redisplay-function after we
	move point.

126 127
2014-10-20  Glenn Morris  <rgm@gnu.org>

128 129
	* Merge in all changes up to 24.4 release.

130 131
2014-10-19  Jan Djärv  <jan.h.d@swipnet.se>

132 133 134
	* gtkutil.c (xg_update_menubar, xg_update_menu_item): Only call
	g_object_notify for label if Gtk+ >= 2.16 (Bug#16522).

135 136 137 138 139 140
	* xterm.h (x_output): Remove net_wm_state_hidden_seen.

	* xterm.c (handle_one_xevent): Check return value from
	x_handle_net_wm_state, remove net_wm_state_hidden_seen (Bug#18722).
	(get_current_wm_state): Remove net_wm_state_hidden_seen setting.

141 142 143 144 145 146 147
	* gtkutil.c (create_dialog): Don't use gtk_dialog_get_action_area on
	Gt+ >= 3.12, or gtk_misc_set_alignment on Gtk+ >= 3.14 (Bug#18674).
	(make_widget_for_menu_item): Don't use gtk_misc_set_alignment on
	Gtk+ >= 3.14 (Bug#18674).
	(update_frame_tool_bar): Don't use  gtk_misc_set_padding on
	Gtk+ >= 3.14 (Bug#18674).

148 149 150 151 152 153 154 155 156
2014-10-18  Paul Eggert  <eggert@cs.ucla.edu>

	* gtkutil.c: Remove no-longer-used code.
	(xg_update_menubar): Remove unused local and unnecessary call to
	gtk_menu_item_get_submenu.
	(XG_TOOL_BAR_PROXY_BUTTON, xg_tool_bar_proxy_callback)
	(xg_get_tool_bar_widgets, xg_tool_bar_proxy_help_callback)
	(TOOLBAR_TOP_WIDGET): Remove; no longer used.

157 158
2014-10-18  Jan Djärv  <jan.h.d@swipnet.se>

159 160
	* xfns.c (syms_of_xfns): Remove x-gtk-whole-detached-tool-bar.

161 162 163 164 165 166 167 168 169 170
	* xterm.h (handlebox_widget): Remove.

	* xmenu.c (set_frame_menubar): Remove GTK block that calls
	xg_have_tear_offs.

	* gtkutil.h (xg_have_tear_offs): Remove declaration.

	* gtkutil.c (XG_TEXT_CANCEL, XG_TEXT_OPEN, XG_TEXT_OK): New defines
	to handle Gtk versions.
	(xg_get_file_with_chooser): Use them.
Stefan Monnier's avatar
Stefan Monnier committed
171 172
	(xg_have_tear_offs, tearoff_remove, tearoff_activate):
	Remove (create_menus): Remove teroff argument and code.
173
	Remove call to gtk_menu_set_title.
Stefan Monnier's avatar
Stefan Monnier committed
174 175
	(xg_update_menubar, xg_update_submenu): Remove tearoff code.
	Adjust args to create_menus.
176 177 178 179 180 181 182 183 184 185
	(xg_tool_bar_menu_proxy, xg_tool_bar_detach_callback)
	(xg_tool_bar_attach_callback, TOOLBAR_TOP_WIDGET): Remove.
	(xg_pack_tool_bar): Replace TOOLBAR_TOP_WIDGET, remove detach code.
	(xg_make_tool_item): Remove detach code.
	(xg_update_tool_bar_sizes): Replace TOOLBAR_TOP_WIDGET.
	(find_icon_from_name): New function.
	(update_frame_tool_bar): Remove GtkStockItem code, move to
	find_icon_from_name.  Let stock be a list of icon names to try.
	Only use gtk_image_new_from_stock on Gtk+ < 3.10.
	Replace TOOLBAR_TOP_WIDGET.
Stefan Monnier's avatar
Stefan Monnier committed
186 187
	(free_frame_tool_bar, xg_change_toolbar_position ):
	Replace TOOLBAR_TOP_WIDGET.
188 189
	(xg_initialize): Remove tearoff code.

190 191
2014-10-18  Eli Zaretskii  <eliz@gnu.org>

192 193 194 195 196 197 198
	* xterm.c (x_draw_bar_cursor, x_draw_hollow_cursor): Subtract 1
	pixel from the window's cursor glyph width, since X renders hollow
	blocks 1 pixel wider than the 'width' parameter.

	* xdisp.c (get_phys_cursor_geometry): Don't subtract 1 pixel from
	glyph->pixel_width; this is now done in xterm.c.

199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
	Fix reordering of bracket characters in isolates.
	* bidi.c (bidi_cache_find): Rename the argument NEUTRALS_OK to
	RESOLVED_ONLY; when non-zero, return from the cache only fully
	resolved states.  All callers changed.
	(CANONICAL_EQU): New macro.
	(PUSH_BPA_STACK): Use it to push onto the BPA stack the canonical
	equivalent of the paired closing bracket character.
	(bidi_find_bracket_pairs): Set the bracket_pairing_pos member to
	the default non-negative value, to be checked later in
	bidi_resolve_brackets.  Use CANONICAL_EQU to test candidate
	characters against those pushed onto the BPA stack.
	(bidi_record_type_for_neutral): New function.
	(bidi_resolve_brackets): Record next_for_neutral and
	prev_for_neutral when embedding level gets pushed.  Force
	resolution of bracket pairs when entering a level run that was not
	yet BPA-resolved.
	(bidi_resolve_neutral): Add assertions before calling
	bidi_resolve_neutral_1.
	(bidi_level_of_next_char): Remove the code that attempted to
	resolve unresolved neutrals; that is now done by
	bidi_resolve_neutral.

221 222
	* w32select.c (owner_callback): Mark with ALIGN_STACK attribute.

223 224 225 226 227 228 229
2014-10-17  Eli Zaretskii  <eliz@gnu.org>

	* xterm.c (x_draw_hollow_cursor): Fix display of hollow cursor on
	1-pixel R2L characters.
	Reported by Dmitry Antipov <dmantipov@yandex.ru>, see
	http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00518.html.

230 231 232 233 234
2014-10-16  Eli Zaretskii  <eliz@gnu.org>

	* bidi.c (bidi_find_bracket_pairs): Avoid a loop that does nothing
	useful.

235 236 237 238 239 240 241
2014-10-15  Paul Eggert  <eggert@cs.ucla.edu>

	* bidi.c (bidi_find_bracket_pairs): Initialize local var.
	This pacifies GCC 4.9.1 with --enable-gcc-warnings.
	It's not clear to me whether the initialization is needed,
	but it can't hurt so I played it safe.

242 243 244 245
2014-10-15  Stefan Monnier  <monnier@iro.umontreal.ca>

	* lisp.mk (lisp): Add emacs-lisp/eldoc.elc.

246 247 248
2014-10-15  Eli Zaretskii  <eliz@gnu.org>

	Update the bidirectional reordering engine for Unicode 6.3 and 7.0.
249 250 251
	* bidi.c (bidi_ignore_explicit_marks_for_paragraph_level):
	Remove variable.
	(bidi_get_type): Return the isolate initiators and terminator types.
252 253 254
	(bidi_isolate_fmt_char, bidi_paired_bracket_type)
	(bidi_fetch_char_skip_isolates, find_first_strong_char)
	(bidi_find_bracket_pairs, bidi_resolve_brackets): New functions.
255
	(bidi_set_sos_type): Rename from bidi_set_sor_type and updated
256 257 258
	for the new features.
	(bidi_push_embedding_level, bidi_pop_embedding_level): Update to
	push and pop correctly for isolates.
259
	(bidi_remember_char): Modify to accept an additional argument
260 261 262
	and record the bidi type according to its value.
	(bidi_cache_iterator_state): Accept an additional argument to only
	update an existing state.  Handle the new members of struct bidi_it.
Eli Zaretskii's avatar
Eli Zaretskii committed
263
	(bidi_cache_find): Arguments changed: no longer accepts a level,
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311
	instead accepts a flag telling it whether it is okay to return
	unresolved neutrals.
	(bidi_initialize): Initiate and staticpro the bracket-type uniprop
	table.  Initialize new isolate-related members.
	(bidi_paragraph_init): Some code factored out into
	find_first_strong_char.
	(bidi_resolve_explicit_1): Function deleted, its code incorporated
	into bidi_resolve_explicit.
	(bidi_resolve_explicit): Support the isolate initiators and
	terminator.  Fix handling of embeddings and overrides according to
	new UBA requirements.  Record information about previously seen
	characters here (moved from bidi_level_of_next_char).
	(bidi_resolve_weak): Adapt to changes in struct members.
	(FLAG_EMBEDDING_INSIDE, FLAG_OPPOSITE_INSIDE, MAX_BPA_STACK)
	(STORE_BRACKET_CHARPOS, PUSH_BPA_STACK): New macros.
	(bidi_resolve_neutral): Call bidi_resolve_brackets to handle the
	paired bracket resolution.  Handle isolate initiators and
	terminator.
	(bidi_type_of_next_char): Remove unneeded code for BN limit.
	(bidi_level_of_next_char): Move the code that records information
	about previous characters to bidi_resolve_explicit.  Fix logic of
	resolving neutrals and make sure their cache entries are updated.
	Remove now unneeded special handling of PDF level.

	* dispextern.h (struct glyph): Enlarge the width of resolved_level.
	(BIDI_MAXDEPTH): New macro, renamed from BIDI_MAXLEVEL and
	enlarged per Unicode 6.3.
	(enum bidi_bracket_type_t): New data type.
	(struct bidi_saved_info): Leave only 2 type members out of 4.
	Remove bytepos.
	(struct bidi_stack): Add members necessary to support isolating
	sequences.
	(struct bidi_it): Add new members necessary to support isolating
	sequences and bracket pair resolution.

	* xdisp.c (Fbidi_resolved_levels): New function.
	(syms_of_xdisp): Defsubr it.
	(append_glyph, append_composite_glyph, produce_image_glyph)
	(append_stretch_glyph, append_glyphless_glyph): Convert aborts to
	assertions.
	(syms_of_xdisp) <inhibit-bidi-mirroring>: New variable.

	* term.c (append_glyph, append_composite_glyph)
	(append_glyphless_glyph): Convert aborts to assertions.

	* .gdbinit (pgx): Display the character codepoint, resolved level,
	and bidi type also for glyphless glyphs.

312 313 314 315 316 317 318 319 320
2014-10-15  Dmitry Antipov  <dmantipov@yandex.ru>

	Avoid unwanted point motion in Fline_beginning_position.
	* lisp.h (scan_newline_from_point): Add prototype.
	* search.c (scan_newline_from_point): New function, refactored from...
	* cmds.c (Fforward_line): ...adjusted user.
	* editfns.c (Fline_beginning_position): Use scan_newline_from_point
	and simplify the former since the latter doesn't move point.

321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353
2014-10-14  Dmitry Antipov  <dmantipov@yandex.ru>

	Cleanup terminal handling code.
	* dispextern.h (get_named_tty): Remove prototype but...
	* termhooks.h (get_named_terminal): ...resurrect it under
	more meaningful name.
	(get_terminal): Likewise, but with...
	(decode_live_terminal): ...this name.
	(decode_tty_terminal): Add prototype.
	* term.c (get_tty_terminal): Remove.
	(get_named_tty): Remove.
	(Ftty_display_color_p, Ftty_display_color_cells, Ftty_type)
	(Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty):
	Use decode_tty_terminal.
	(Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal.
	* terminal.c (get_terminal): Refactor to...
	(decode_terminal, decode_live_terminal): ...new functions.
	(decode_tty_terminal): Replacement for get_tty_terminal.
	(get_named_terminal): Likewise for get_named_tty.
	* coding.c (Fset_terminal_coding_system_internal)
	(Fterminal_coding_system, Fset_keyboard_coding_system_internal):
	(Fkeyboard_coding_system):
	* composite.c (Fcomposition_get_gstring):
	* dispnew.c (Fsend_string_to_terminal):
	* frame.c (Fmake_terminal_frame):
	* nsfns.m (check_ns_display_info):
	* w32fns.c, xfns.c (check_x_display_info):
	* xselect.c (frame_for_x_selection): Use decode_live_terminal.
	* keyboard.c (handle_interrupt_signal, handle_interrupt)
	(Fset_quit_char): Use get_named_terminal.
	(Fset_output_flow_control, Fset_input_meta_mode):
	Use decode_tty_terminal.

354 355 356 357 358
2014-10-13  Eli Zaretskii  <eliz@gnu.org>

	* w32term.h (ALIGN_STACK): Use _WIN64, not _W64, to distinguish
	between 32-bit and 64-bit MinGW builds.  (Bug#18699)

359
2014-10-12  Paul Eggert  <eggert@cs.ucla.edu>
360 361 362 363

	Fix port to Debian GNU/kFreeBSD 7 (wheezy) (Bug#18666).
	* process.c (accept4) [!HAVE_ACCEPT4]: New macro.

364
2014-10-12  Stefan Monnier  <monnier@iro.umontreal.ca>
365 366 367 368

	* frame.c (Fmouse_pixel_position): Call Vmouse_position_function
	(bug#18638).

369 370
2014-10-12  Paul Eggert  <eggert@cs.ucla.edu>

371 372 373
	* editfns.c (dump_tz_string): No longer const.
	It might be modified.

374 375
	* nsmenu.m (clear): Assume OS X 10.6 or later.

376 377 378 379 380 381 382 383 384 385 386
2014-10-12  Jan Djärv  <jan.h.d@swipnet.se>

	* unexmacosx.c: Remove include ppc/reloc.h.
	(unrelocate, copy_dysymtab): Remove PPC code.
	(rebase_reloc_address): Remove, only used for PPC:

	* nsterm.m: Always include macfont.h on COCOA.
	(ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
	(ns_dumpglyphs_image, ns_check_menu_open)
	(applicationDidFinishLaunching)
	(antialiasThresholdDidChange:)
387 388
	(keyDown:, toggleFullScreen:, setPosition:portion:whole:):
	Remove checks for OSX <= 10.5/10.6.
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
	(changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
	(syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
	GNUSTEP.

	* nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
	(NS_HAVE_NSINTEGER): Remove block.
	Remove >= OSX 10.6 tests.

	* nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
	(x_activate_menubar, trackingNotification:): Remove check for
	OSX >= 10.5.
	(menuNeedsUpdate:): Remove check for OSX < 10.5.

	* nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.

	* nsfns.m: Always include macfont.h on COCOA.
	(ns_filename_from_panel, ns_directory_from_panel)
	(Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
	(Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6

	* macfont.m: Remove >= 1050 check.
	(macfont_create_family_with_symbol)
	(macfont_get_glyph_for_character)
	(mac_font_get_glyphs_for_variants)
413 414
	(mac_ctfont_create_available_families, syms_of_macfont):
	Remove code for OSX < 10.6.
415 416 417 418 419 420 421 422 423
	(mac_font_family_group, mac_font_family_compare): Remove, only used
	for OSX < 10.6.

	* macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
	(mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6

	* Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
	comment.

424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461
2014-10-12  Paul Eggert  <eggert@cs.ucla.edu>

	Fix putenv race conditions with undefined behavior (Bug#8705).
	Do all putenv calls before Emacs creates any threads.
	Use a safer way to modify the TZ environment variable in the
	presence of multiple threads.  For further thread-safety,
	prefer localtime_r and gmtime_r to localtime and gmtime,
	and prefer struct tm's tm_gmtoff (if available) to calling
	both localtime_r and gmtime_r.
	* dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
	(init_dbusbind): ... to this new function.
	* emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
	* xterm.c (x_term_init): Move xputenv call from here ...
	(init_xterm): ... to this new function.
	* emacs.c (main) [USE_GTK]: Call it before creating threads.
	* editfns.c (HAVE_TM_GMTOFF): Default to false.
	(dump_tz_string): New constant.
	(init_editfns): Use it.  This centralizes the dump_tz stuff.
	Call set_time_zone_rule here, so that its xputenv is done
	before Emacs goes multithreaded.
	(mktime_z) [!HAVE_TZALLOC]: New function, which is typically
	thread-safe enough for Emacs.
	(format_time_string, Fdecode_time, Fcurrent_time_string)
	(Fcurrent_time_zone):
	Prefer localtime_r and gmtime_r, which are more thread-safe, to
	localtime and gmtime.  Remove now-unnecessary calls to block_input.
	(tm_gmtoff): New static function.
	(Fdecode_time, Fcurrent_time_zone): Use it.
	(Fencode_time): Use mktime_z, for better thread-safety.
	(set_time_zone_rule): Now static.  Rewrite to be mostly thread-safe,
	i.e., not quite thread-safe but good enough for Emacs typical usage.
	Do not reclaim storage that is in the environment; let it leak.
	Always call tzset, since localtime_r does not.
	* emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
	This is now done in init_editfns.
	* systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
	New macros and declarations, for platforms lacking tzalloc & friends.

462 463 464 465 466 467 468 469 470
2014-10-09  Paul Eggert  <eggert@cs.ucla.edu>

	* lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS.
	On x86 platforms this works around GCC bug 63495
	<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495>,
	and more generally should fix a portability problem in Emacs.
	Problem reported by Stefan Monnier in:
	http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00261.html

471 472 473 474 475 476 477 478 479 480 481
2014-10-08  Leo Liu  <sdl.web@gmail.com>

	Enhance terpri to allow conditionally output a newline.  (Bug#18652)
	* keymap.c (describe_vector_princ):
	* keyboard.c (Fcommand_error_default_function): Adapt to change to
	Fterpri.

	* print.c (printchar_stdout_last): Declare.
	(printchar): Record the last char written to stdout.
	(Fterpri): Add optional argument ENSURE.

482 483
2014-10-08  Eli Zaretskii  <eliz@gnu.org>

484 485 486 487 488 489 490
	* w32inevt.c (maybe_generate_resize_event): Pass non-zero as the
	DELAY argument to change_frame_size, so that the frame size
	changes, if any are needed, are delayed until the next redisplay.
	This is to avoid a too early QUIT inside change_frame_size, when
	it calls Lisp in frame_windows_min_size, in case one of the events
	we've read sets the quit-flag.  (Bug#18649)

491 492 493
	* w32fns.c (check_x_display_info): Accept terminal objects as
	argument, to follow what xfns.c does.

494 495 496 497 498
2014-10-07  Glenn Morris  <rgm@gnu.org>

	* Makefile.in ($(srcdir)/macuvs.h)
	($(lispsource)/international/charprop.el): Add explicit FORCE.

499 500 501 502 503 504
2014-10-07  Eli Zaretskii  <eliz@gnu.org>

	* decompress.c (init_zlib_functions): Move the message about zlib
	being unavailable from here...
	(Fzlib_decompress_region): ...to here.  (Bug#18650)

505 506 507 508 509
2014-10-07  Dmitry Antipov  <dmantipov@yandex.ru>

	* font.c (Ffont_get_glyphs): Use validate_subarray and fix
	the case where an optional string is used.  Adjust docstring.

510 511 512 513
2014-10-06  Stefan Monnier  <monnier@iro.umontreal.ca>

	* lisp.mk (lisp): Remove w32-common-fns.elc.

514 515 516 517 518 519 520
2014-10-05  Paul Eggert  <eggert@cs.ucla.edu>

	* keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927).
	These were already defined in buffer.c, and the duplicate
	definitions cause problems on platforms like 'gcc -fno-common'.
	Reported by Peter Dyballa in: http://bugs.gnu.org/9927#137

Jan Djärv's avatar
Jan Djärv committed
521 522
2014-10-05  Jan Djärv  <jan.h.d@swipnet.se>

Jan Djärv's avatar
Jan Djärv committed
523 524 525
	* nsterm.m (updateFrameSize:): Only call update_frame_tool_bar
	if toolbar is visible.

526 527 528
	* nsfont.m (nsfont_draw): Use CGFloat for GNUstep newer than
	0.23 (Bug#18030).

529 530
	* nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new.
	(toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
531 532
	(ns_select, ns_read_socket): Use unwind_protect to decrease
	apploopnr (Bug#18345).
533 534
	(ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
	line height (Bug#17977).
535

536
	* macfont.m: Fix indentation and import changes from macport 24.3.94.
Jan Djärv's avatar
Jan Djärv committed
537
	(macfont_closest_traits_index): New function.
538
	(macfont_closest_traits_index_p): Rename from
Jan Djärv's avatar
Jan Djärv committed
539 540 541
	macfont_closest_traits_index.
	(macfont_list): Use macfont_closest_traits_index_p.

542 543 544 545 546
2014-10-05  K. Handa  <handa@gnu.org>

	* coding.c (detect_coding_iso_2022): Set coding->rejected
	correctly when an invalid escape sequence is found (Bug#18610).

547 548 549 550 551 552
2014-10-04  Jan Djärv  <jan.h.d@swipnet.se>

	* gtkutil.c (create_menus): Only add tearoffs to empty menus.
	(xg_update_submenu): Remove has_tearoff_p, pass 1 to create_menus
	for add_tearoff_p.

553 554
2014-10-04  Martin Rudalics  <rudalics@gmx.at>

555 556
	* buffer.c (scroll_bar_width, scroll_bar_height):
	Fix doc-strings.
557 558 559
	* window.c (Fset_window_scroll_bars): Fix doc-string.
	(Fwindow_scroll_bars): Have it return what the doc-string says.

560
2014-10-03  Eli Zaretskii  <eliz@gnu.org>
561 562 563 564

	* xdisp.c (move_it_by_lines): Call reseat_1 after moving the
	iterator backwards, to resync the bidi iterator.  (Bug#18584)

565 566 567 568 569 570 571 572 573 574 575
2014-10-03  Dmitry Antipov  <dmantipov@yandex.ru>

	Consistently use min and max macros from lisp.h.
	* coding.c (min, max):
	* font.c (MAX):
	* unexhp9k800.c (min):
	* unexw32.c (min, max): Use definitions from lisp.h.
	* regex.c (MAX, MIN) [!emacs]: Define own max and min as such.
	Adjust users.
	* gmalloc.c (min): Tiny style change.

576 577 578
	* fileio.c (emacs_readlinkat, Finsert_file_contents):
	* w32fns.c, xfns.c (x_create_tip_frame): Use AUTO_STRING.

579 580 581 582 583 584 585 586 587 588 589
2014-10-03  Paul Eggert  <eggert@cs.ucla.edu>

	Fix x-focus-frame bug with "Not an in-range integer" (Bug#18586).
	* xselect.c (X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX, X_LONG_MIN)
	(X_ULONG_MAX): Move these macros to xterm.h.
	(x_fill_property_data): Be more generous about allowing either
	signed or unsigned data of the appropriate width.
	* xterm.h (x_display_set_last_user_time): New function.
	All setters of last_user_time changd to use this function.
	If ENABLE_CHECKING, check that the times are in range.

590 591 592 593 594
2014-10-02  Eli Zaretskii  <eliz@gnu.org>

	* dispnew.c (adjust_decode_mode_spec_buffer): Use 'int' instead of
	'ssize_t'.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.

Stefan Monnier's avatar
Stefan Monnier committed
595
2014-10-02  Jan Djärv  <jan.h.d@swipnet.se>
596 597 598

	* xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
	make a font_object from a tty frame (Bug#18573).
Stefan Monnier's avatar
Stefan Monnier committed
599 600
	(Finternal_set_lisp_face_attribute): Add FIXME comment.

601 602 603 604 605 606 607 608
2014-10-02  Dmitry Antipov  <dmantipov@yandex.ru>

	* alloc.c (mark_overlay): Assume that overlay boundaries are
	always markers.  Add comment.
	* lread.c (read_internal_start): Use convenient validate_subarray.
	Adjust docstring.
	(Fread_from_string): Adjust docstring.

609 610
2014-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>

611 612
	* lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false.

613 614 615
	* nsselect.m (ns-own-selection-internal, ns-disown-selection-internal):
	Rename from the "x-" prefix.

616 617 618 619
2014-10-01  Stefan Monnier  <monnier@iro.umontreal.ca>

	* xselect.c (selection-converter-alist): Fix docstring.

620 621 622 623 624 625
2014-10-01  Eli Zaretskii  <eliz@gnu.org>

	* w32proc.c (sys_spawnve): Avoid modification of the CMDNAME
	argument passed by the caller, when we mirror all slashes into
	backslashes.

626 627 628 629 630
2014-10-01  Dmitry Antipov  <dmantipov@yandex.ru>

	* gtkutil.c (xg_set_toolkit_horizontal_scroll_bar_thumb):
	Resurrect old code and fix compilation with GTK < 2.13.6.

631 632
2014-10-01  Paul Eggert  <eggert@cs.ucla.edu>

633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648
	Use AUTO_CONS instead of SCOPED_CONS, etc.
	* frame.h (AUTO_FRAME_ARG): Rename from FRAME_PARAMETER.
	* lisp.h (AUTO_CONS): Rename from scoped_cons.
	(AUTO_LIST1): Rename from scoped_list1.
	(AUTO_LIST2): Rename from scoped_list2.
	(AUTO_LIST3): Rename from scoped_list3.
	(AUTO_LIST4): Rename from scoped_list4.
	(AUTO_STRING): Rename from SCOPED_STRING.
	* frame.h (AUTO_FRAME_ARG):
	* lisp.h (AUTO_CONS, AUTO_LIST1, AUTO_LIST2, AUTO_LIST3)
	(AUTO_LIST4, AUTO_STRING):
	Prepend a new argument 'name'.
	Declare a variable instead of yielding a value.
	All uses changed.
	* lisp.h (STACK_CONS, AUTO_CONS_EXPR): New internal macros.

649 650 651 652 653 654 655 656 657 658
2014-09-30  Eli Zaretskii  <eliz@gnu.org>

	* w32fns.c (w32_createwindow): Accept an additional argument, an
	array of 2 values specifying the coordinates of the frame's
	top-left corner.  Use these values instead of calling x_get_arg,
	which can cons Lisp objects, and therefore cannot be called except
	from the main thread.  Remove redundant tests for the default
	values.
	(my_create_window): Move the calculation of the coordinates of the
	frame's top-left edge here.  Pass them to the input thread via the
659 660
	second parameter of the WM_EMACS_CREATEWINDOW message.
	See http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
661 662
	for the details.

Stefan Monnier's avatar
Stefan Monnier committed
663
2014-09-30  Eli Zaretskii  <eliz@gnu.org>
664 665 666 667 668 669 670

	* xdisp.c (cursor_row_fully_visible_p): Update commentary.
	(redisplay_window): Treat the frame's frozen_window_starts flag
	the same way as the optional_new_start flag for the window: only
	obey it if the glyph row showing point will be fully visible.
	Likewise when the window start is in a continuation line.  If,
	after trying everything under the 'force_start' label, point is
671 672
	still not fully visible, give up and scroll the window.
	Add debugging traces.  (Bug#18545)
673 674 675

	* window.c (Frecenter): Set the window's redisplay flag.

Stefan Monnier's avatar
Stefan Monnier committed
676
2014-09-30  Eli Zaretskii  <eliz@gnu.org>
677 678 679 680 681 682 683 684 685 686 687 688

	* w32term.c (w32_read_socket): Don't use frame dimensions for
	resizing if GetClientRect returned an empty (0, 0, 0, 0)
	rectangle.  Check the return value of GetClientRect, and don't use
	the results if it didn't succeed.

	* dispnew.c (change_frame_size_1): Recompute the frame dimensions
	in columns and lines after correcting the pixel dimensions in
	check_frame_size.
	(adjust_decode_mode_spec_buffer): Add assertion to avoid passing
	negative values to xrealloc.  (Bug#18528)

689 690
2014-09-30  Paul Eggert  <eggert@cs.ucla.edu>

691 692 693 694
	* alloc.c: Remove now-unnecessary check.
	Suggested by Dmitry Antipov in:
	http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00891.html

695 696
	* xterm.c (x_term_init): Allocate temps on stack, not on heap.

697 698 699
	* frame.c (x_set_frame_parameters): Port --enable-gcc-warnings
	to Ubuntu 14.04.1 x86-64.

700 701 702 703 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
	Simplify stack-allocated Lisp objects, and make them more portable.
	The build_local_string macro was used in two ways: (1) string
	literals for which scoped allocation suffices, and (2) file name
	components, where it's not safe in general to assume bounded-size
	ASCII data.  Simplify by defining a new macro SCOPED_STRING that
	allocates a block-scope string, and by using SCOPED_STRING for (1)
	and build_string for (2).  Furthermore, actually use stack
	allocation only for objects known to have sufficient alignment.
	This simpler implementation means Emacs can make
	USE_STACK_LISP_OBJECTS the default unless GC_MARK_STACK !=
	GC_MAKE_GCPROS_NOOPS.
	* lisp.h (GCALIGNED): Align even if !USE_STACK_LISP_OBJECTS,
	for fewer differences among implementations.
	(struct Lisp_String): Now GCALIGNED.
	(USE_STACK_LISP_OBJECTS): Default to true, since the
	implementation no longer insists on a nonempty GCALIGNED.
	But make it false if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS.
	(SCOPED_CONS_INITIALIZER): Remove, since it's no longer needed
	separately.  Move definiens to scoped_cons.  The old definition
	was incorrect when GCALIGNED was defined to be empty.
	(union Aligned_String): New type.
	(USE_STACK_CONS, USE_STACK_STRING): New constants, so that the
	implementation ports to compilers that don't align strictly enough.
	Don't worry about the union sizes; it's not worth bothering about.
	(scoped_cons, scoped_list1, scoped_list3, scoped_list4):
	Rewrite using USE_STACK_CONS.
	(scoped_cons): Assume the use of union Aligned_Cons.
	(lisp_string_size, make_local_string, build_local_string): Remove.
	Unless otherwise specified, all callers of build_local_string
	changed to use SCOPED_STRING.
	(SCOPED_STRING): New macro.
	* data.c (wrong_choice):
	* menu.c (single_menu_item):
	* process.c (Fformat_network_address):
	Hoist use of SCOPED_STRING out of a scope, so that its returned
	object lives long enough.
	* fileio.c (Fexpand_file_name): Use build_string, not SCOPED_STRING,
	as the string might be long or might not be ASCII.

739 740 741 742
2014-09-29  Eli Zaretskii  <eliz@gnu.org>

	* msdos.c (internal_terminal_init): Bump version to 25.

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
2014-09-29  Dmitry Antipov  <dmantipov@yandex.ru>

	Keep stack-allocated Lisp objects fast rather than versatile.
	* lisp.h (union Aligned_Cons) [!GCALIGNED]: Define as such.
	(SCOPED_CONS_INITIALIZER): New macro.
	(scoped_cons) [USE_STACK_LISP_OBJECTS]: Use it.
	(USE_LOCAL_ALLOCA): Remove.
	(local_cons, local_list1, local_list2, local_list3, local_list4):
	Remove.  Stack overflow checking makes them too slow.
	(make_local_vector): Likewise.  Also we just don't have enough
	users for it.
	(enum LISP_STRING_OVERHEAD): Remove.
	(local_string_init, local_vector_init): Remove prototypes.
	(make_local_string, build_local_string): Redesign to target short
	compile-time string constants, fall back to regular string allocation
	where appropriate.
	(lisp_string_size): New function.
	(verify_ascii) [ENABLE_CHECKING]: Add prototype.
	* alloc.c (local_string_init, local_vector_init): Remove.
	(verify_ascii) [ENABLE_CHECKING]: New function.
	* buffer.c, charset.c, chartab.c, data.c, editfns.c, emacs.c, fileio.c:
	* fns.c, font.c, fontset.c, frame.c, keyboard.c, keymap.c, lread.c:
	* menu.c, minibuf.c, process.c, textprop.c, xdisp.c, xfns.c, xfont.c:
	* xselect.c, xterm.c: All related users changed.

768 769 770 771 772
2014-09-28  Ken Brown  <kbrown@cornell.edu>

	* sheap.c (bss_sbrk_buffer_beg): Remove redundant variable.
	* gmalloc.c [CYGWIN]: Adapt to change in sheap.c.

773 774 775 776 777 778 779 780
2014-09-27  Ken Brown  <kbrown@cornell.edu>

	Fix implementation of HYBRID_MALLOC on Cygwin.
	* sheap.c (bss_sbrk_buffer_end): Cast to void *.
	(bss_sbrk_buffer_beg): New variable.  Use it...
	* gmalloc.c (ALLOCATED_BEFORE_DUMPING) [CYGWIN]: ...here, to fix
	incorrect definition.

781 782
2014-09-27  Stefan Monnier  <monnier@iro.umontreal.ca>

783 784 785
	* keyboard.c (track-mouse): Rename to internal--track-mouse.
	Make it into a function and change arg to be a function.

786 787
	* lisp.mk (lisp): Add elisp-mode.elc.

788 789 790 791 792 793
2014-09-26  Paul Eggert  <eggert@cs.ucla.edu>

	* xfns.c (x_default_scroll_bar_color_parameter):
	Use USE_LOCAL_ALLOCA only if USE_TOOLKIT_SCROLL_BARS,
	to pacify --enable-gcc-warnings in non-scrollbar builds.

794 795 796 797
2014-09-26  Ken Brown  <kbrown@cornell.edu>

	* w32term.h (ALIGN_STACK): Fix the cpp condition.

798 799
2014-09-25  Eli Zaretskii  <eliz@gnu.org>

800 801 802
	* lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
	MinGW builds that use GCC before 4.2.

803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819
	Default to stack objects on DOS_NT platforms as well.
	* w32term.h (ALIGN_STACK) [__GNUC__]: Define to
	__attribute__((force_align_arg_pointer)) for GCC 4.2 and later.

	* lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition.

	* w32proc.c (enum_locale_fn, enum_codepage_fn): Add the
	ALIGN_STACK attribute.

	* w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute.

	* w32uniscribe.c (add_opentype_font_name_to_list): Add the
	ALIGN_STACK attribute.

	* w32font.c (add_font_name_to_list, add_font_entity_to_list)
	(add_one_font_entity_to_list): Add the ALIGN_STACK attribute.

820 821 822 823 824 825 826 827 828 829 830
2014-09-25  Martin Rudalics  <rudalics@gmx.at>

	* frame.c (frame_inhibit_resize):
	* widget.c (EmacsFrameResize):
	* window.c (resize_frame_windows, Fset_window_configuration):
	* xdisp.c (expose_frame):
	* xfns.c (x_change_tool_bar_height):
	* xmenu.c (update_frame_menubar):
	* xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1):
	Remove code left dead after 2014-07-27 changes.

831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880
2014-09-25  Paul Eggert  <eggert@cs.ucla.edu>

	Fix local_cons etc. to not exhaust the stack when in a loop.
	Problem reported in:
	http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00696.html
	* buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
	* charset.c (load_charset_map_from_file, Ffind_charset_region)
	(Ffind_charset_string):
	* chartab.c (uniprop_encode_value_numeric, uniprop_table):
	* data.c (wrong_range):
	* editfns.c (Fpropertize, format2):
	* emacs.c (init_cmdargs, decode_env_path):
	* fileio.c (auto_save_error):
	* fns.c (Fyes_or_no_p):
	* font.c (font_style_to_value, font_parse_xlfd)
	(font_parse_family_registry, font_delete_unmatched)
	(font_add_log):
	* fontset.c (Fset_fontset_font):
	* frame.c (x_get_arg):
	* keyboard.c (echo_dash, safe_run_hooks_error, parse_menu_item)
	(read_char_minibuf_menu_prompt):
	* keymap.c (silly_event_symbol_error, describe_vector):
	* lread.c (load_warn_old_style_backquotes):
	* menu.c (single_menu_item):
	* minibuf.c (Fread_buffer):
	* process.c (status_message, Fformat_network_address)
	(server_accept_connection):
	* textprop.c (copy_text_properties):
	* xdisp.c (Fcurrent_bidi_paragraph_direction):
	* xfns.c (x_default_scroll_bar_color_parameter):
	* xfont.c (xfont_open):
	* xselect.c (x_clipboard_manager_error_1):
	* xterm.c (x_term_init):
	Put USE_LOCAL_ALLOCA at the start of the function.
	* fns.c (maybe_resize_hash_table): Use build_string instead of
	build_local_string, since we'd otherwise need a conditional
	USE_LOCAL_ALLOCA here, but this is just debugging output and is
	not worth the bother of optimization.
	* font.c (font_delete_unmatched): Remove by-hand code that
	observed MAX_ALLOCA limit, since it's now done automatically.
	* keymap.c (Fsingle_key_description): Put USE_SAFE_ALLOCA at top,
	since build_local_string needs its sa_alloc.
	* lisp.h (lisp_word_count): New function.
	(SAFE_ALLOCA_LISP): Use it.
	(USE_LOCAL_ALLOCA): New macro.
	(local_cons, make_local_vector, make_local_string):
	Observe the MAX_ALLOCA limit.
	(LISP_STRING_OVERHEAD): New constant.
	(make_local_string): Use it.

881 882
2014-09-24  Paul Eggert  <eggert@cs.ucla.edu>

883 884 885 886 887
	Default to stack objects on non-GNU/Linux, non-DOS_NT platforms.
	* lisp.h (USE_STACK_LISP_OBJECTS): Also default to true
	if !defined DOS_NT && !defined GNU_LINUX.  I've tested this on AIX
	and Solaris and it's likely to work on similar platforms.

888 889 890 891 892 893 894 895 896 897 898
	Avoid signed integer overflow when converting Time to ptrdiff_t.
	* keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
	New macros.
	(position_to_Time, Time_to_position): New functions.
	(gen_help_event, kbd_buffer_get_event): Use them.
	* systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
	Go back to plain 'unsigned long', so that 'Time' is the same
	for both X and non-X builds; this is less likely to cause surprise.
	* termhooks.h: Remove compile-time check that Time and ptrdiff_t
	are the same size; this is no longer required.

899 900 901 902
	* keyboard.c (make_lispy_event): Avoid unnecessary tests
	of bit 28 and of whether an unsigned value is negative.
	This simplifies the code a bit, and pacifies clang 3.4.

903 904 905 906 907 908 909 910 911 912 913 914 915
2014-09-24  Eli Zaretskii  <eliz@gnu.org>

	* systime.h (Time): Define as size_t, to be consistent with 64-bit
	Windows builds, where 'long' is a 32-bit type.

	* w32inevt.h (w32_console_mouse_position): Update the argument
	types to use 'Time'.

	* w32term.c (w32_mouse_position)
	(x_horizontal_scroll_bar_report_motion)
	(x_scroll_bar_report_motion): Update the argument types to use
	'Time'.

916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935
2014-09-24  Dmitry Antipov  <dmantipov@yandex.ru>

	* termhooks.h (enum scroll_bar_part): Begin from 0 to allow...
	(struct input_event): ...unsigned bitfields.  Likewise for
	`event_kind' member.  Prefer unsigned for `code' and 'modifiers'.
	Use `timestamp' for HELP_EVENT position.  Add compile-time assert.
	* keyboard.c (gen_help_event, kbd_buffer_store_help_event)
	(kbd_buffer_get_event): Adjust users.
	(scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
	(make_scroll_bar_position): New function, refactored out of...
	(make_lispy_event): ...adjusted user.
	* nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
	* nsterm.m (ns_mouse_position, mouseUp):
	* term.c (term_mouse_position):
	* w32inevt.c (w32_console_mouse_position):
	* w32term.c (w32_mouse_position):
	* xterm.c (XTmouse_position): Use scroll_bar_above_handle.
	(x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
	Prefer enum and explicit enum members to integers and numeric values.

936 937 938 939 940
	* chartab.c (uniprop_encode_value_numeric):
	* font.c (font_style_to_value): Use make_local_vector.
	(font_delete_unmatched): Use local_cons but respect MAX_ALLOCA.
	* keymap.c (append_key): Use scoped_list1.

941 942 943
	* lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX
	&& __GNUC__ && !__clang__.  Mention known problems.  Adjust comment.

944 945 946 947 948 949 950 951 952 953 954
2014-09-24  Paul Eggert  <eggert@cs.ucla.edu>

	Fix some slow uses and misuses of strcat.
	* doc.c (get_doc_string):
	* gtkutil.c (get_utf8_string):
	* xsmfns.c (x_session_initialize):
	Avoid recomputation of string length.
	* ftfont.c (ftfont_spec_pattern):
	* xfns.c (xic_create_fontsetname):
	Don't assume output buffer is initially zero.

955 956
2014-09-23  Paul Eggert  <eggert@cs.ucla.edu>

957 958 959 960 961
	* lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.
	All callers changed.
	* xterm.c (x_term_init): Use new functionality to avoid two needs
	to compute a string length.

962 963
	* dispextern.h, xdisp.c (window_box_right_offset): Now static.

964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980
2014-09-23  Dmitry Antipov  <dmantipov@yandex.ru>

	Use known length of a Lisp string to copy it faster.
	* lisp.h (lispstrcpy): New function.  Add comment.
	* callproc.c (child_setup):
	* dbusbind.c (xd_append_arg):
	* doc.c (get_doc_string):
	* font.c (Ffont_xlfd_name):
	* frame.c (xrdb_get_resource):
	* process.c (Fmake_network_process, network_interface_info):
	* w32fns.c (Fx_open_connection):
	* w32proc.c (sys_spawnve):
	* xfns.c (select_visual):
	* xfont.c (xfont_list):
	* xsmfns.c (x_session_initialize):
	* xterm.c (x_term_init): Use it.

981 982 983
2014-09-23  Paul Eggert  <eggert@cs.ucla.edu>

	Fix SAFE_ALLOCA to not exhaust the stack when in a loop.
984
	Problem reported by Dmitry Antipov in thread leading to:
985 986 987 988 989 990 991 992 993 994
	http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
	This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
	the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
	remain unfixed.
	* callproc.c (call_process): Save and restore sa_avail.
	* lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
	(AVAIL_ALLOCA): New macro.
	(SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
	Use it, and check against sa_avail rather than MAX_ALLOCA.

995 996 997 998 999 1000
2014-09-22  Dmitry Antipov  <dmantipov@yandex.ru>

	On OSX, do not free font-specific data more than once (Bug#18501).
	* macfont.m (macfont_close): Release and free font-specific data
	only if it wasn't previously freed.

Stefan Monnier's avatar
Stefan Monnier committed
1001
2014-09-22  David Caldwell <david@porkrind.org>  (tiny change)
1002 1003 1004

	* unexmacosx.c (dump_it): Improve error message.

Stefan Monnier's avatar
Stefan Monnier committed
1005
2014-09-22  Juri Linkov  <juri@jurta.org>
1006 1007 1008 1009

	* image.c (imagemagick_load_image): Add delay to imagemagick metadata.
	(Bug#10747, bug#18334)

Stefan Monnier's avatar
Stefan Monnier committed
1010
2014-09-22  Eli Zaretskii  <eliz@gnu.org>
1011

1012 1013 1014
	* frame.c (Fmouse_position, Fset_mouse_position): Clarify the
	units in which the position is measured.  (Bug#18493)

1015 1016 1017
	* xdisp.c (redisplay_internal): Force redisplay of all windows
	that show a buffer whose narrowing has changed.  (Bug#18490)

Stefan Monnier's avatar
Stefan Monnier committed
1018
2014-09-22  Eli Zaretskii  <eliz@gnu.org>
1019

1020 1021 1022 1023 1024 1025
	* xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
	* w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
	lines, draw the hollow-box and hbar cursors on the right side of
	cursor-glyph.  Thanks to martin rudalics <rudalics@gmx.at> for
	testing on X.

1026 1027 1028 1029 1030 1031
	* xterm.c (x_draw_stretch_glyph_string):
	* w32term.c (x_draw_stretch_glyph_string): Fix a thinko that
	caused the block cursor to disappear on a TAB in R2L lines in
	every window except the leftmost one.  Reported by Martin Rudalics
	<rudalics@gmx.at>.

Stefan Monnier's avatar
Stefan Monnier committed
1032
2014-09-22  Dmitry Antipov  <dmantipov@yandex.ru>
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042

	Always use matched specpdl entry to record call arguments (Bug#18473).
	* lisp.h (record_in_backtrace): Adjust prototype.
	* eval.c (record_in_backtrace): Return current specpdl level.
	(set_backtrace_args, set_backtrace_nargs): Merge.  Adjust all users.
	(eval_sub, Ffuncall): Record call arguments in matched specpdl
	entry and use that entry in call to backtrace_debug_on_exit.
	(apply_lambda): Likewise.  Get current specpdl level as 3rd arg.
	(do_debug_on_call): Get current specpdl level as 2nd arg.

1043 1044 1045 1046 1047 1048
	Prefer ptrdiff_t to int and avoid integer overflows.
	* fileio.c (make_temp_name):
	* font.c (font_parse_family_registry): Avoid integer
	overflow on string size calculation.
	* data.c (Faset): Likewise for byte index.

Stefan Monnier's avatar
Stefan Monnier committed
1049
2014-09-22  Eli Zaretskii  <eliz@gnu.org>
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062

	Fix display of R2L lines in partial-width windows.
	* xdisp.c (init_iterator): Don't use it->bidi_p before it is
	assigned the correct value.
	(extend_face_to_end_of_line): Account for truncation and
	continuation glyphs in R2L rows when one of the fringes is not
	displayed.
	(display_line): Don't assign negative X offset to a row if we are
	going to produce a truncation glyph for it.  When handling
	truncated R2L rows, consider the width of the left fringe instead
	of the right one.
	(produce_special_glyphs): Fix bogus assignments.

1063 1064 1065 1066 1067 1068
2014-09-22  Eli Zaretskii  <eliz@gnu.org>

	* fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
	always set to a valid value.  Make sure the size passed to alloca
	is always positive.  (Bug#18516)

1069 1070 1071 1072 1073 1074 1075 1076 1077
2014-09-22  Dmitry Antipov  <dmantipov@yandex.ru>

	Avoid extra call to oblookup when interning symbols.
	* lisp.h (intern_driver): Add prototype.
	* lread.c (intern_driver): New function.
	(intern1, intern_c_string_1, Fintern):
	* font.c (font_intern_prop):
	* w32font.c (intern_font_name): Use it.

1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089
2014-09-21  Paul Eggert  <eggert@cs.ucla.edu>

	Minor improvements to new stack-allocated Lisp objects.
	* frame.h (FRAME_PARAMETER):
	Prefer scoped_list1 to local_list1 where either would do.
	* lisp.h (scoped_list4): New macro.
	(local_cons, local_list1, local_list2, local_list3, local_list4)
	(make_local_vector, make_local_string, build_local_string):
	Prefer functions to macros where either would do.
	* xdisp.c (build_desired_tool_bar_string):
	Prefer scoped_list4 to local_list4 where either would do.

1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106
2014-09-18  Dmitry Antipov  <dmantipov@yandex.ru>

	More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.
	* lisp.h (local_list4) [USE_LOCAL_ALLOCATORS]: New macro.
	[!USE_LOCAL_ALLOCATORS]: Fall back to regular list4.
	* frame.h (FRAME_PARAMETER): New macro.
	* dispnew.c (init_display):
	* fontset.c (Fset_fontset_font):
	* frame.c (x_default_parameter):
	* xfaces.c (set_font_frame_param, Finternal_merge_in_global_face):
	* xfns.c (x_default_scroll_bar_color_parameter)
	(x_default_font_parameter, x_create_tip_frame): Use it.
	* editfns.c (Fpropertize): Use local_cons.
	* process.c (status_message): Use build_local_string.
	* xfont.c (xfont_open): Use make_local_string.
	* xdisp.c (build_desired_tool_bar_string): Use local_list4.

1107 1108 1109
2014-09-18  Paul Eggert  <eggert@cs.ucla.edu>

	Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.
1110 1111 1112
	* lisp.h (USE_LOCAL_ALLOCATORS): Define only if __GNUC__ &&
	!__clang__.  This works with GCC and with clang and is safer for
	compilers we don't know about.
1113 1114
	(local_cons): Rename parameter to make capture less likely.

1115 1116 1117 1118
2014-09-17  Samuel Bronson  <naesten@gmail.com>

	* unexmacosx.c (copy_data_segment): Port to GCC 4.6+ (Bug#9927).

1119 1120 1121 1122 1123 1124 1125 1126
2014-09-17  Paul Eggert  <eggert@cs.ucla.edu>

	Fix minor problems found by static checking.
	* alloc.c, lisp.h (SAVE_TYPE_INT_OBJ, make_save_int_obj):
	Remove; now unused.
	* buffer.h (decode_buffer): Doc and indentation fixes.
	* fns.c (Qstring_collate_lessp, Qstring_collate_equalp): Now static.

1127 1128 1129 1130 1131 1132
2014-09-17  Dmitry Antipov  <dmantipov@yandex.ru>

	Avoid clang-specific warnings.
	* buffer.c (init_buffer): Shut up -Wself-assign.
	* process.c (server_accept_connection): Shut up -Wunsequenced.

1133 1134 1135 1136
2014-09-16  Daniel Colascione  <dancol@dancol.org>

	* fns.c (sxhash): For symbols, use address as hash code.

1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154
2014-09-16  Dmitry Antipov  <dmantipov@yandex.ru>

	If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.
	* charset.c (load_charset_map_from_file): Use scoped_list2
	and build_local_string.
	* buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
	* emacs.c (init_cmdargs, decode_env_path):
	* fileio.c (Fexpand_file_name):
	* fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]:
	* frame.c (x_get_arg):
	* keyboard.c (safe_run_hooks_error):
	* lread.c (load_warn_old_style_backquotes):
	* xdisp.c (Fcurrent_bidi_paragraph_direction):
	* xfns.c (x_default_scroll_bar_color_parameter, select_visual):
	* xselect.c (x_clipboard_manager_error_1)
	(x_clipboard_manager_save_all):
	* xterm.c (x_term_init): Use build_local_string.

1155 1156 1157 1158 1159
	Avoid more integer overflows on string size calculations.
	* category.c (Fmake_category_set):
	* xdisp.c (get_overlay_arrow_glyph_row):
	* w32font.c (intern_font_name): Prefer ptrdiff_t to int.

1160 1161 1162 1163 1164 1165 1166 1167
2014-09-15  Eli Zaretskii  <eliz@gnu.org>

	* sound.c [WINDOWSNT]: Include w32common.h and mbstring.h.
	(SOUND_WARNING) [WINDOWSNT]: Include in do..while and improve the
	error message format.  Use message_with_string to have non-ASCII
	file names properly displayed.
	(do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files
	when w32-unicode-filenames is non-nil, but not on Windows 9X,
Stefan Monnier's avatar
Stefan Monnier committed
1168 1169
	where these APIs are not available even in UNICOWS.DLL.
	Improve the format of error messages and include the file name in them
1170 1171 1172 1173
	where appropriate.
	(Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch
	call play-sound-functions, per documentation.

Stefan Monnier's avatar
Stefan Monnier committed
1174 1175
	* w32.c (w32_get_long_filename, w32_get_short_filename):
	Constify the input file name arguments.
1176

Stefan Monnier's avatar
Stefan Monnier committed
1177 1178
	* w32.h (w32_get_long_filename, w32_get_short_filename):
	Update prototypes.
1179

1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213
2014-09-15  Dmitry Antipov  <dmantipov@yandex.ru>

	If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
	* lisp.h (local_cons, local_list1, local_list2, local_list3)
	[USE_LOCAL_ALLOCATORS]: New macros.
	[!USE_LOCAL_ALLOCATORS]: Fall back to regular functions.
	(build_local_string): Avoid argument name expansion clash with
	make_local_string.
	* alloc.c (toplevel)
	[USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]:
	Preprocessor guard to avoid impossible configuration.
	* charset.c (Ffind_charset_region, Ffind_charset_string):
	Use make_local_vector.
	* lread.c (read1, substitute_object_recurse): Use scoped_cons.
	* textprop.c (Fput_text_property, Fadd_face_text_property):
	Use scoped_list2.
	(copy_text_properties): Use local_cons and local_list3.
	* chartab.c (uniprop_table):
	* data.c (wrong_choice, wrong_range):
	* doc.c (get_doc_string):
	* editfns.c (format2):
	* fileio.c (Fexpand_file_name, auto_save_error):
	* fns.c (Fyes_or_no_p):
	* font.c (font_parse_xlfd, font_parse_family_registry, font_add_log):
	* fontset.c (Fset_fontset_font):
	* keyboard.c (echo_add_key, echo_dash, parse_menu_item)
	(read_char_minibuf_menu_prompt):
	* keymap.c (silly_event_symbol_error, describe_vector):
	* menu.c (single_menu_item):
	* minibuf.c (Fread_buffer):
	* process.c (status_message, Fformat_network_address)
	(server_accept_connection): Use make_local_string and
	build_local_string.  Prefer compound literals where appropriate.

Daniel Colascione's avatar
Daniel Colascione committed
1214 1215 1216 1217
2014-09-15  Daniel Colascione  <dancol@dancol.org>

	* fns.c (Fsort): Tweak sort docstring.

1218
2014-09-15  Eli Zaretskii  <eliz@gnu.org>
1219

1220
	* w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes.
1221 1222 1223 1224 1225
	(sys_write): When a write to a non-blocking pipe returns ENOSPC,
	set errno to EAGAIN instead, to allow the caller to retry the
	write after some waiting.  Fixes deadlocks when Emacs exchanges a
	lot of data through the pipe.  (Bug#18420)

1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236
	* sound.c (Fplay_sound_internal): Encode the sound file name in
	the ANSI codepage.  Expand it against data-directory, as per docs,
	not against the current directory.  No need to make a local copy
	of the file name; pass the encoded file name directly to
	do_play_sound.  (Bug#18463)

	* w32.c (ansi_encode_filename): If w32_get_short_filename returns
	NULL, and the file name is not encodable in ANSI codepage, return
	the string with "?" replacement characters, which will fail the
	caller.  This avoids returning a random value in that case.

1237
2014-09-15  Martin Rudalics  <rudalics@gmx.at>
1238 1239 1240 1241

	* window.c (Fresize_mini_window_internal): Set w->total_lines
	from w->pixel_height (Bug#18422).

1242
2014-09-15  Jan Djärv  <jan.h.d@swipnet.se>
1243 1244 1245 1246 1247

	* nsterm.m (updateFrameSize:, initFrameFromEmacs:)
	(toggleFullScreen:): Take frame_resize_pixelwise into account when
	setting resize increments (Bug#18435).

1248
2014-09-15  Eli Zaretskii  <eliz@gnu.org>
1249 1250 1251 1252 1253 1254

	* xdisp.c (pos_visible_p): Properly save and restore the iterator
	state around the call to line_bottom, since it can move the
	iterator to another screen line.  This fixes off-by-one errors in
	the reported row in some rare cases.

1255 1256 1257 1258 1259
2014-09-14  Jan Djärv  <jan.h.d@swipnet.se>

	* callproc.c (init_callproc): Fix bug introduced at
	2014-09-07 (Bug#18474).

1260 1261 1262 1263 1264 1265 1266 1267
2014-09-13  Dmitry Antipov  <dmantipov@yandex.ru>

	Prefer ptrdiff_t to int and avoid integer overflows.
	* fileio.c (make_temp_name):
	* font.c (font_parse_family_registry): Avoid integer
	overflow on string size calculation.
	* data.c (Faset): Likewise for byte index.

1268 1269 1270 1271
2014-09-12  Detlev Zundel  <dzu@member.fsf.org>

	* buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).

1272 1273 1274 1275 1276
2014-09-11  Dmitry Antipov  <dmantipov@yandex.ru>

	* lisp.h (make_local_string): Nitpick indent.
	* print.c (Fprin1_to_string): Remove unused GCPROs.

1277 1278 1279 1280 1281
	More debugging aids around GCPROs.
	* lisp.h (struct gcpro) [DEBUG_GCPRO]: Add extra members.
	(GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, GCPRO7):
	Minor restyle.  If DEBUG_GCPRO, initialize extra fields.

1282 1283 1284
	* lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix
	bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.

Stefan Monnier's avatar
Stefan Monnier committed
1285 1286
	Remove redundant GCPROs around Ffuncall and Fapply calls.
	This is safe because Ffuncall protects all of its arguments by itself.
1287 1288 1289 1290 1291
	* charset.c (map_charset_for_dump): Remove redundant GCPRO.
	* eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5)
	(call6, call7): Likewise.  Use compound literals where applicable.
	(run_hook_with_args_2): Use compound literal.

1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306
2014-09-11  Paul Eggert  <eggert@cs.ucla.edu>

	Pacify --enable-gcc-warnings when no window system is used.
	These warnings found that subscript error, so they seem worthwhile.
	* composite.c (char_composable_p): Simplify a bit.
	* frame.c (x_set_frame_parameters): Add an IF_LINT.
	* frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
	* frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
	* window.c (set_window_scroll_bars):
	Use USE_HORIZONTAL_SCROLL_BARS for simplicity.
	* frame.h [! USE_HORIZONTAL_SCROLL_BARS]:
	Ignore -Wsuggest-attribute=const.
	* window.h (USE_HORIZONTAL_SCROLL_BARS): New macro.
	(WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.

1307 1308 1309 1310 1311 1312 1313
2014-09-10  Paul Eggert  <eggert@penguin.cs.ucla.edu>

	* charset.c (Fget_unused_iso_final_char): Fix subscript error.
	Use check_iso_charset_parameter instead of doing the checks by hand.
	(check_iso_charset_parameter): Move up.  Check parameters a bit
	more carefully, and return true for 96-char sets.  All callers changed.

1314 1315 1316 1317 1318 1319 1320 1321 1322 1323
2014-09-10  Paul Eggert  <eggert@cs.ucla.edu>

	Simplify lisp.h by removing the __COUNTER__ business.
	Problem reported by Dmitry Antipov in:
	http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00220.html
	* lisp.h (make_local_vector, make_local_string)
	(build_local_string): Simplify by not bothering with __COUNTER__.
	The __COUNTER__ business wasn't working properly, and was needed
	only for hypothetical future expansion anyway.

1324 1325 1326 1327 1328
2014-09-10  Alp Aker  <alp.tekin.aker@gmail.com>

	* nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other
	terms to determine bitmap color.  (Bug#18437)

1329 1330 1331 1332 1333
2014-09-10  Eli Zaretskii  <eliz@gnu.org>

	* w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF
	translation buffer.

1334 1335 1336 1337
2014-09-10  Paul Eggert  <eggert@cs.ucla.edu>

	* xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.

1338 1339 1340 1341 1342
2014-09-10  Jan Djärv  <jan.h.d@swipnet.se>

	* xterm.c (handle_one_xevent): Detect iconified by looking at
	_NET_WM_STATE_HIDDEN.

1343 1344
2014-09-10  Paul Eggert  <eggert@cs.ucla.edu>

1345 1346 1347 1348 1349 1350 1351 1352 1353 1354
	* lisp.h (DEFINE_GDB_SYMBOL_ENUM): Remove.
	These can generate a constant with the correct value but the wrong
	width, which doesn't work as a printf argument.  All uses removed.
	Problem reported by Dmitry Antipov in:
	http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00213.html
	(ENUMABLE): Remove; no longer needed.
	(ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
	Remove; no longer needed because of the above change.
	Each definiens moved to the only use.

1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379
	Improve the experimental local and scoped allocation.
	* alloc.c (local_string_init, local_vector_init):
	New functions, defined if USE_LOCAL_ALLOCATORS.
	Mostly, these are moved here from lisp.h, as it's not
	clear it's worth making them inline.
	* lisp.h (USE_STACK_LISP_OBJECTS): Default to false.
	(GCALIGNED): Depend on HAVE_STRUCT_ATTRIBUTE_ALIGNED and
	USE_STACK_LISP_OBJECTS, not on a laundry list.
	(local_string_init, local_vector_init): New decls.
	(union Aligned_Cons): New type.
	(scoped_cons): Use it.  Give up on the char trick, as it's a too
	much of a maintenance hassle; if someone wants this speedup
	they'll just need to convince their compiler to align properly.
	Conversely, use the speedup if struct Lisp_Cons happens to
	be aligned even without a directive.  Better yet, help it along
	by using union Aligned_Cons rather than struct Lisp_Cons.
	(pointer_valid_for_lisp_object): Remove.  This check is not
	necessary, since make_lisp_ptr is already doing it.  All uses removed.
	(local_vector_init, local_string_init): Move to alloc.c.
	(build_local_vector): Remove this awkward macro, replacing with ...
	(make_local_vector): New macro, which acts more like a function.
	Use statement expressions and use __COUNTER__ to avoid macro
	capture.  Fall back on functions if these features are not supported.
	(build_local_string, make_local_string): Likewise.

1380 1381 1382 1383 1384 1385 1386
2014-09-09  Dmitry Antipov  <dmantipov@yandex.ru>

	* xterm.c (x_term_init): Consolidate duplicated code.
	[USE_LUCID]: Revert 2014-04-02 change (Bug#18403).  Add comment.
	(x_delete_terminal): Do not close X connection fd (Bug#18403).
	Add eassert and mark dpyinfo as dead only if it was alive.

1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398
	Add macros to allocate temporary Lisp objects with alloca.
	Respect MAX_ALLOCA and fall back to regular GC for large objects.
	* character.h (parse_str_as_multibyte): Move prototype to ...
	* lisp.h (parse_str_as_multibyte): ... here.
	(struct Lisp_Cons): Add GCALIGNED attribute if supported.
	(scoped_cons, scoped_list2, build_local_vector, build_local_string):
	New macros.
	(scoped_cons_init, pointer_valid_for_lisp_object, local_vector_init)
	(local_string_init): New functions.
	* alloc.c (verify_alloca) [ENABLE_CHECKING]: New function.
	(init_alloc_once): Call it.

1399 1400 1401 1402 1403 1404 1405 1406 1407
	Cleanup last change and make all new stuff conditional.
	* lisp.h (build_local_string): Rename to ...
	(make_local_string): ... this macro.
	(build_local_string, scoped_list1, scoped_list3): New macros.
	(toplevel) [USE_STACK_LISP_OBJECTS]: Define all new macros
	and functions as such, use regular fallbacks otherwise.
	* alloc.c (verify_alloca) [USE_STACK_LISP_OBJECTS]: Define
	conditionally.

1408
2014-09-08  Eli Zaretskii  <eliz@gnu.org>
1409 1410 1411 1412 1413

	* dispnew.c (prepare_desired_row): When MODE_LINE_P is zero,
	always make sure the marginal areas of the row are in sync with
	what the window wants.  (Bug#18419)

1414 1415 1416 1417
	* data.c (set_internal): Use assq_no_quit, not Fassq, to find an
	existing binding of a variable, to avoid silently aborting
	commands that use specbind.  (Bug#18331)

1418 1419
2014-09-07  Paul Eggert  <eggert@cs.ucla.edu>

1420 1421 1422 1423 1424 1425 1426 1427 1428 1429
	Fix bug uncovered by changing alloca to auto buffer (Bug#18410).
	* coding.c (growable_destination): New function.
	(produce_chars): Use it for sanity checks.  Do not fiddle with
	dst_end if the source and destination are both nil, as it's
	the caller's responsibility to avoid overlap.
	* keyboard.c (read_decoded_event_from_main_queue):
	The destination must be MAX_MULTIBYTE_LENGTH times the max source
	length, not 4 times, to prevent decode_coding_c_string from trying
	to reallocate a destination.  This removes the need for the FIXME.

1430 1431 1432 1433
	* callproc.c (exec_failed) [DOS_NT]: Define a dummy.
	All callers simplified.  Add a comment about exec_failed, vfork,
	and alloca.

1434 1435 1436 1437 1438
	Adjust drag-and-drop fix when window is above top (Bug#18303).
	* xselect.c (x_fill_property_data): Don't let sign bit of negative
	XCDR bleed into XCAR's encoded value.  Improve checks for
	out-of-range data while we're at it.

1439 1440 1441 1442 1443
2014-09-07  Jan Djärv  <jan.h.d@swipnet.se>

	* xselect.c (x_fill_property_data): Handle negative XCDR when data
	is CONSP (Bug#18303).

1444 1445 1446 1447 1448 1449 1450
2014-09-07  Eli Zaretskii  <eliz@gnu.org>

	* callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if
	'alloca' gets passed arguments larger than MAX_ALLOCA.

	* font.c (MAX): Define if not defined elsewhere.

1451 1452
2014-09-07  Paul Eggert  <eggert@cs.ucla.edu>

1453 1454 1455 1456 1457
	* keyboard.c (read_decoded_event_from_main_queue): Reinstitute alloca
	here for destination buffer, to work around what appears to be a
	bug in decode_coding_c_string when the source and destination are
	both C strings.

1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481
	Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410).
	This follows up on the recent thread in emacs-devel on alloca; see:
	http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
	This patch also cleans up alloca-related glitches noted while
	examining the code looking for unbounded alloca.
	* alloc.c (listn):
	* callproc.c (init_callproc):
	Rewrite to avoid need for alloca.
	* buffer.c (mouse_face_overlay_overlaps)
	(report_overlay_modification):
	* buffer.h (GET_OVERLAYS_AT):
	* coding.c (make_subsidiaries):
	* doc.c (Fsnarf_documentation):
	* editfns.c (Fuser_full_name):
	* fileio.c (Ffile_name_directory, Fexpand_file_name)
	(search_embedded_absfilename, Fsubstitute_in_file_name):
	* fns.c (Fmake_hash_table):
	* font.c (font_vconcat_entity_vectors, font_update_drivers):
	* fontset.c (fontset_pattern_regexp, Ffontset_info):
	* frame.c (Fmake_terminal_frame, x_set_frame_parameters)
	(xrdb_get_resource, x_get_resource_string):
	* ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
	* ftxfont.c (ftxfont_draw):
	* image.c (xbm_load, xpm_load, jpeg_load_body):
1482 1483
	* keyboard.c (echo_add_key, menu_bar_items, tool_bar_items)

1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 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 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554
	* keymap.c (Fdescribe_buffer_bindings, describe_map):
	* lread.c (openp):
	* menu.c (digest_single_submenu, find_and_call_menu_selection)
	(find_and_return_menu_selection):
	* print.c (PRINTFINISH):
	* process.c (Fformat_network_address):
	* scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
	* search.c (search_buffer, Fmatch_data, Fregexp_quote):
	* sound.c (wav_play, au_play):
	* syntax.c (skip_chars):
	* term.c (tty_menu_activate, tty_menu_show):
	* textprop.c (get_char_property_and_overlay):
	* window.c (Fset_window_configuration):
	* xdisp.c (safe__call, next_overlay_change, vmessage)
	(compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
	* xfaces.c (face_at_buffer_position):
	* xmenu.c (x_menu_show):
	Use SAFE_ALLOCA etc. instead of plain alloca, since the
	allocation size isn't bounded.
	* callint.c (Fcall_interactively): Redo memory_full check
	so that it can be done at compile-time on some platforms.
	* coding.c (MAX_LOOKUP_MAX): New constant.
	(get_translation_table): Use it.
	* callproc.c (call_process): Use SAFE_NALLOCA instead of
	SAFE_ALLOCA, to catch integer overflows on size calculation.
	(exec_failed) [!DOS_NT]: New function.
	(child_setup) [!DOS_NT]: Use it.
	* editfns.c (Ftranspose_regions):
	Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
	* editfns.c (check_translation):
	Allocate larger buffers on the heap.
	* eval.c (internal_lisp_condition_case):
	Check for MAX_ALLOCA overflow.
	* fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
	(Fbase64_encode_region, Fbase64_decode_region):
	Avoid unnecessary calls to SAFE_FREE before 'error'.
	* buffer.c (mouse_face_overlay_overlaps):
	* editfns.c (Fget_pos_property, check_translation):
	* eval.c (Ffuncall):
	* font.c (font_unparse_xlfd, font_find_for_lface):
	* ftfont.c (ftfont_drive_otf):
	* keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
	(menu_bar_items, tool_bar_items):
	* sound.c (Fplay_sound_internal):
	* xdisp.c (load_overlay_strings, dump_glyph_row):
	Use an ordinary auto buffer rather than alloca, since the
	allocation size is fixed and small.
	* ftfont.c: Include <c-strcase.h>.
	(matching_prefix): New function.
	(get_adstyle_property): Use it, to avoid need for alloca.
	* keyboard.c (echo_add_key):
	* keymap.c (describe_map): Use ptrdiff_t, not int.
	* keyboard.c (echo_add_key): Prefer sizeof to strlen.
	* keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
	when counting bytes.
	* lisp.h (xlispstrdupa): Remove, replacing with ...
	(SAFE_ALLOCA_STRING): ... new macro with different API.
	This fixes a portability problem, namely, alloca result
	passed to another function.  All uses changed.
	(SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
	not MAX_ALLOCA - 1.
	* regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
	(REGEX_ALLOCATE): New macros.
	(REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
	(REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
	Use them.
	* xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
	by hand.
	(decode_mode_spec_coding): Store directly into buf rather than
	into an alloca temporary and copying the temporary to the buf.

1555 1556 1557 1558
2014-09-06  Eli Zaretskii  <eliz@gnu.org>

	* Makefile.in (EMACS_HEAPSIZE): Remove, no longer used.  (Bug#18416)

Jan Djärv's avatar
Jan Djärv committed
1559
2014-09-04  Jan D  <jan.h.d@swipnet.se>
Jan Djärv's avatar
Jan Djärv committed
1560 1561 1562 1563 1564 1565

	* xterm.c (x_term_init): Don't call x_session_initialize if running
	as a daemon (Bug#18375).

	* xsmfns.c: Initialize ice_fd.

Paul Eggert's avatar
Paul Eggert committed
1566 1567 1568 1569 1570 1571 1572
2014-09-04  Paul Eggert  <eggert@cs.ucla.edu>

	Less chatter in 'make' output.
	* Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at)
	(am__v_at_, am__v_at_0, am__v_at_1):  New macros, taken from Automake.
	($(etc)/DOC, buildobj.h, gl-stamp): Use them.

1573 1574 1575
2014-09-03  Martin Rudalics  <rudalics@gmx.at>

	* buffer.c (scroll-bar-height): Fix typo in doc-string.
Stefan Monnier's avatar
Stefan Monnier committed
1576 1577
	* frame.c (Vdefault_frame_horizontal_scroll_bars):
	Remove variable.
1578 1579 1580 1581 1582
	* nsfns.m (Fx_create_frame):
	* w32fns.c (Fx_create_frame):
	* xfns.c (Fx_create_frame): Default horizontal scroll bars to
	nil.

1583
2014-09-03  Eli Zaretskii  <eliz@gnu.org>
1584 1585 1586 1587 1588 1589

	* dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
	the reported row in the case of a window with a header line, by
	improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org
	eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc.  (Bug#18384)

1590
2014-09-03  Paul Eggert  <eggert@cs.ucla.edu>
1591 1592 1593 1594

	* eval.c (internal_lisp_condition_case): Don't overrun the stack
	when configured --with-wide-int on typical 32-bit platforms.

1595
2014-09-03  Eli Zaretskii  <eliz@gnu.org>
1596 1597 1598 1599 1600

	* xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
	when HPOS is negative, for the benefit of R2L glyph rows whose
	newline overflows into the fringe.

1601
2014-09-03  Ken Brown  <kbrown@cornell.edu>
1602

1603
	* conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define.  (Bug#18366)