ChangeLog 753 KB
Newer Older
1 2 3 4
2012-10-28  Stefan Monnier  <monnier@iro.umontreal.ca>

	* frame.c (x_set_font): Catch internal error.

5 6
2012-10-27  Eli Zaretskii  <eliz@gnu.org>

7 8
	Avoid overflow in w32 implementation of interval timers.
	When possible, for ITIMER_PROF count only times the main thread
9 10
	actually executes.
	* w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
11 12
	'volatile ULONGLONG' types.  All the other data which was
	previously clock_t is now ULONGLONG.  'terminate' is 'volatile int'.
13 14 15 16 17
	(GetThreadTimes_Proc): New typedef.
	(w32_get_timer_time): New function, returns a suitable time value
	for the timer.
	(timer_loop): Enter critical section when accessing ULONGLONG
	values of the itimer_data struct, as these accesses are no longer
18 19
	atomic.  Call 'w32_get_timer_time' instead of 'clock'.
	Remove unused variable.
20 21 22 23
	(init_timers): Initialize s_pfn_Get_Thread_Times.
	(start_timer_thread): Don't assign itimer->caller_thread here.
	(getitimer): Assign itimer->caller_thread here.
	(setitimer): Always call getitimer to get the value of ticks_now.
24
	(sys_spawnve): Avoid compiler warning about format mismatch.
25

26 27 28 29 30 31 32
2012-10-26  Eli Zaretskii  <eliz@gnu.org>

	* w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
	mouse movement events if the menu bar is active.  This avoids
	producing a busy "hour-glass" cursor by Windows if the mouse
	pointer is positioned over a tooltip shown for some menu item.

33 34 35 36 37 38 39 40 41
2012-10-25  Paul Eggert  <eggert@cs.ucla.edu>

	Don't assume process IDs fit in int.
	* emacs.c (shut_down_emacs) [!DOS_NT]:
	* sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
	* term.c (dissociate_if_controlling_tty) [!DOS_NT]:
	Use pid_t, not int, to store process IDs, as 'int'
	is not wide enough on a few platforms (e.g., AIX and IRIX).

42 43 44 45 46 47 48 49
2012-10-23  Kenichi Handa  <handa@gnu.org>

	The following change is to make face-font-rescale-alist work
	correctly for non-ASCII fonts.

	* font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
	(font_open_for_lface): Handle Vface_font_rescale_alist.

50 51 52 53
2012-10-23  Chong Yidong  <cyd@gnu.org>

	* xfaces.c (Vfont_list_limit): Move unused variable to faces.el.

54 55
2012-10-21  Jan Djärv  <jan.h.d@swipnet.se>

56 57 58 59
	* nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
	for screen font.
	(nsfont_draw): Turn off LCD-smoothing (Bug#11484).

60 61 62
	* xterm.c (x_focus_changed): Check if daemonp when sending focus in
	event (Bug#12681).

63 64 65 66
2012-10-21  Glenn Morris  <rgm@gnu.org>

	* lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.

Paul Eggert's avatar
Paul Eggert committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
2012-10-20  Paul Eggert  <eggert@cs.ucla.edu>

	Port to OpenBSD 5.1.
	* frame.c (Fmouse_position, Fmouse_pixel_position):
	* xdisp.c (produce_stretch_glyph):
	Declare local vars only when they're needed.
	This is clearer and avoids a warning on OpenBSD about unused vars.
	* frame.h (FRAME_WINDOW_P): Always evaluate its argument.
	This is safer, and avoids OpenBSD warnings about unused vars.
	* keyboard.c (record_menu_key): Remove unnecessary decl.
	(poll_timer): Define only if POLL_FOR_INPUT is defined.
	* unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
	as our definition clashes with OpenBSD's.
	* xfaces.c (load_face_colors, check_lface_attrs)
	(get_lface_attributes_no_remap, get_lface_attributes)
	(lface_fully_specified_p, x_supports_face_attributes_p)
	(tty_supports_face_attributes_p, face_fontset, realize_face)
	(realize_x_face, realize_tty_face):
	Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
	merely Lisp_Object *.  This is more informative and avoids
	a warning on OpenBSD about accessing beyond an object's size.

Chong Yidong's avatar
Chong Yidong committed
89 90 91 92
2012-10-20  Chong Yidong  <cyd@gnu.org>

	* lread.c (Fload): Doc fix (Bug#12592).

93
2012-10-19  Kazuhiro Ito  <kzhr@d1.dion.ne.jp>  (tiny change)
94 95 96

	* font.c (Ffont_at): Fix previous change.

Eli Zaretskii's avatar
Eli Zaretskii committed
97 98
2012-10-19  Eli Zaretskii  <eliz@gnu.org>

99 100
	* puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
	See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
101 102
	for the reasons.

Eli Zaretskii's avatar
Eli Zaretskii committed
103 104
	* alloc.c (NSTATICS): Decrease to 0x800.

105 106 107 108 109
2012-10-19  Stefan Monnier  <monnier@iro.umontreal.ca>

	* fns.c (Fnreverse): Include the problem element when signalling an
	error (bug#12677).

110 111 112 113 114
2012-10-18  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (ns_select): Check writefds before call to
	FD_ISSET (Bug#12668).

115 116 117 118 119 120
2012-10-18  Daniel Colascione  <dancol@dancol.org>

	* alloc.c (NSTATICS): Increase from 0x650 to 0x1000
	(staticpro): If we run out of staticpro slots, die with an
	informative error instead of just calling emacs_abort.

121 122 123 124 125 126 127
2012-10-18  Martin Rudalics  <rudalics@gmx.at>

	Fix two flaws reported by Dmitry Antipov.
	* window.c (Ftemp_output_buffer_show): Remove.
	(Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
	(syms_of_window): Remove defsubr for Stemp_output_buffer_show.

128 129
2012-10-17  Eli Zaretskii  <eliz@gnu.org>

130 131 132 133 134
	* makefile.w32-in ($(BLD)/w32.$(O)):
	($(BLD)/vm-limit.$(O)):
	($(BLD)/term.$(O)):
	($(BLD)/unexw32.$(O)):
	($(BLD)/fileio.$(O)):
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
	($(BLD)/dispnew.$(O)): Update dependencies.

	* w32term.h (w32_initialize_display_info, initialize_w32_display):
	Add prototypes.

	* w32proc.c: Include ctype.h.

	* w32.h (init_environment, check_windows_init_file)
	(syms_of_ntproc, syms_of_ntterm, dostounix_filename)
	(unixtodos_filename, init_winsock, srandom, random, sys_pipe)
	(set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
	(sys_link): Add prototypes.

	* w32.c: Include w32select.h.
	(sys_access, e_malloc, sys_select): Add prototypes.
	(emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.

	* vm-limit.c [WINDOWSNT]: Include w32heap.h.

	* unexw32.c: Include lisp.h and w32.h.

	* term.c [WINDOWSNT]: Include w32term.h.

	* process.c [WINDOWSNT]: Add prototype of sys_select.

	* fileio.c [WINDOWSNT]: Include w32.h.

	* dispnew.c [WINDOWSNT]: Include w32.h.

164 165 166 167 168 169 170
	* cygw32.c (Fcygwin_convert_path_to_windows)
	(Fcygwin_convert_path_from_windows): Use EQ to compare 2
	Lisp_Object values.  (Bug#12661)

	* w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
	to Lisp_Object.  (Bug#12661)

171 172 173 174 175
2012-10-17  Kenichi Handa  <handa@gnu.org>

	* xdisp.c (reseat_1): Make the information stored in it->cmp_it
	invalidate.

176 177 178
2012-10-17  Dmitry Antipov  <dmantipov@yandex.ru>

	* buffer.c (Fkill_buffer): When unchaining the marker,
Juanma Barranquero's avatar
Juanma Barranquero committed
179
	reset its buffer pointer to NULL (Bug#12652).
180

181 182 183 184 185 186
2012-10-17  Dmitry Antipov  <dmantipov@yandex.ru>

	Do not verify indirection counters of killed buffers (Bug#12579).
	* buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
	* buffer.c (compact_buffer, set_buffer_internal_1): Use it.

187 188 189 190 191 192 193
2012-10-16  Dmitry Antipov  <dmantipov@yandex.ru>

	* alloc.c (Fmake_byte_code): Fix typo in comment.
	* print.c (print_interval): Define as static to match prototype.
	* indent.c (disptab_matches_widthtab, recompute_width_table):
	Convert to eassert.

194 195 196 197 198 199 200
2012-10-16  Dmitry Antipov  <dmantipov@yandex.ru>

	* editfns.c (get_system_name): Remove.
	* lisp.h (get_system_name): Remove prototype.
	* xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
	(get_environ_db): Use Vsystem_name.  Avoid call to strlen.

201 202 203 204
2012-10-15  Daniel Colascione  <dancol@dancol.org>

	* dbusbind.c: Add comment explaining reason for previous change.

205 206 207 208 209 210 211
2012-10-15  Martin Rudalics  <rudalics@gmx.at>

	* window.c (Fwindow_end): Rewrite check whether cached position
	can be used (Bug#12600).
	(resize_frame_windows, grow_mini_window, shrink_mini_window):
	Set windows_or_buffers_changed.

212 213 214 215 216 217
2012-10-15  Daniel Colascione  <dancol@dancol.org>

	* dbusbind.c: Fix cygw32 build break when compiling with dbus
	enabled by undefining the symbol "interface", which the platform
	headers define to something incompatible.

218 219 220 221 222 223
2012-10-14  Daniel Colascione  <dancol@dancol.org>

	* image.c (init_tiff_functions, init_imagemagick_functions)
	(init_svg_functions): Fix cygw32 build break by using these
	functions only when WINDOWSNT _and_ HAVE_NTGUI.

224 225 226 227
2012-10-14  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).

228 229 230 231
2012-10-13  Jan Djärv  <jan.h.d@swipnet.se>

	* gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).

232 233 234 235 236
2012-10-13  HANATAKA, Shinya  <bogytech@gmail.com>  (tiny change)

	* coding.c (detect_coding): Set coding->id before calling
	this->detector.

Andreas Schwab's avatar
Andreas Schwab committed
237 238 239 240
2012-10-13  Andreas Schwab  <schwab@linux-m68k.org>

	* fileio.c: Formatting fixes.

Paul Eggert's avatar
Paul Eggert committed
241 242 243 244 245 246 247 248 249 250 251 252 253
2012-10-13  Paul Eggert  <eggert@cs.ucla.edu>

	Fix some stat-related races.
	* fileio.c (Fwrite_region): Avoid race condition if a file is
	removed or renamed by some other process immediately after Emacs
	writes it but before Emacs stats it.  Do not assume that stat (or
	fstat) succeeds.
	* image.c (slurp_file): Resolve the file name with fopen + fstat
	rather than stat + fopen.
	(pbm_read_file) [0]: Remove unused code with stat race.
	* process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
	Remove ineffective code with stat race.

254 255 256 257
2012-10-12  Stefan Monnier  <monnier@iro.umontreal.ca>

	* doc.c (get_doc_string): Don't signal an error if the file is missing.

258 259 260 261 262 263 264 265 266 267 268
2012-10-12  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (hold_event_q): New static variable.
	(EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
	! q_event_ptr.
	(hold_event): New function.
	(ns_read_socket): If hold_event_q have events, store them and
	return (Bug#12384).
	(setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
	is zero (Bug#12384).

269 270 271 272
2012-10-12  Juanma Barranquero  <lekktu@gmail.com>

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

273 274
2012-10-12  Eli Zaretskii  <eliz@gnu.org>

275 276
	* makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.

277 278 279 280 281 282
	* fileio.c (check_existing): New function.
	(make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
	instead of calling 'stat', when what's needed is to check whether
	a file exists.  This avoids expensive system calls on MS-Windows.
	(Bug#12587)

283
	* w32.c (init_environment): Call 'check_existing' instead of 'stat'.
284 285 286 287 288 289

	* lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
	determine whether a file exists and is not a directory.

	* lisp.h (check_existing): Add prototype.

290 291 292 293
2012-10-12  Jan Djärv  <jan.h.d@swipnet.se>

	* nsfont.m (nsfont_open): Remove font cache, it is not GC correct.

294 295 296 297
2012-10-12  Glenn Morris  <rgm@gnu.org>

	* buffer.c (Fset_buffer): Doc fix.  (Bug#12624)

298 299
2012-10-11  Stefan Monnier  <monnier@iro.umontreal.ca>

300 301
	* buffer.c (Fkill_buffer): Null out the overlay list(s) as well.

302 303
	* eval.c (Fautoload): Remember previous autoload status in load-history.

304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
2012-10-11  Paul Eggert  <eggert@cs.ucla.edu>

	lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
	* lread.c (load_each_byte, new_backquote_flag, readchar)
	(read_filtered_event, lisp_file_lexically_bound_p)
	(safe_to_load_version, Fload, complete_filename_p, openp)
	(build_load_history, readevalloop, read_escape, read1)
	(string_to_number, read_vector, read_list):
	* macros.c (Fstart_kbd_macro):
	* marker.c (CONSIDER):
	* menu.c (parse_single_submenu, digest_single_submenu)
	(find_and_return_menu_selection, Fx_popup_menu):
	* minibuf.c (read_minibuf_noninteractive, read_minibuf)
	(Ftry_completion):
	* nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
	(ns_menu_show):
	* xmenu.c (set_frame_menubar, create_and_show_popup_menu)
	(xmenu_show, xdialog_show):
	Use bool for booleans.
	* lread.c (safe_to_load_version): Rename from safe_to_load_p,
	as it's not a predicate.  All uses changed.  Omit unnecessary
	buffer termination.

327 328 329 330 331
2012-10-11  Dmitry Antipov  <dmantipov@yandex.ru>

	* editfns.c (save_excursion_save): Use nil if mark points to nowhere.
	(save_excursion_restore): Do not restore mark if it was not saved.

332 333
2012-10-11  Paul Eggert  <eggert@cs.ucla.edu>

334 335
	* marker.c (cached_modiff): EMACS_INT, not int.

336 337
	* w32select.c (waiting_for_input): Declare by including "keyboard.h"
	instead of having a wrong decl.
338 339
	* nsmenu.m (waiting_for_input): Remove wrong decl.

340 341
2012-10-10  Paul Eggert  <eggert@cs.ucla.edu>

342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389
	keyboard.c, keymap.c: Use bool for booleans.
	* dispnew.c (sit_for): Distinguish between 3-way display_option
	and boolean do_display.
	* keyboard.c (single_kboard, this_command_key_count_reset)
	(waiting_for_input, echoing, immediate_quit, input_pending)
	(interrupt_input, interrupts_deferred, pop_kboard)
	(temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
	(command_loop_1, adjust_point_for_property)
	(safe_run_hooks_error, input_polling_used, read_char):
	(help_char_p, readable_events, kbd_buffer_events_waiting)
	(kbd_buffer_get_event, timer_check_2, make_lispy_event)
	(lucid_event_type_list_p, get_input_pending):
	(gobble_input, menu_separator_name_p, menu_bar_item)
	(parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
	(read_char_minibuf_menu_prompt, access_keymap_keyremap)
	(keyremap_step, test_undefined, read_key_sequence)
	(detect_input_pending, detect_input_pending_ignore_squeezables)
	(detect_input_pending_run_timers, requeued_events_pending_p)
	(quit_throw_to_read_char, Fset_input_interrupt_mode):
	* keymap.c (get_keymap, keymap_parent, keymap_memberp)
	(access_keymap_1, access_keymap, map_keymap, get_keyelt)
	(Fdefine_key, Flookup_key, struct accessible_keymaps_data)
	(accessible_keymaps_1, Fkey_description, push_key_description):
	(shadow_lookup, struct where_is_internal_data)
	(where_is_internal, Fwhere_is_internal, where_is_internal_1)
	(Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
	(describe_map, describe_vector):
	* menu.c (single_menu_item):
	* nsmenu.m (ns_update_menubar):
	* process.c (wait_reading_process_output):
	* search.c (scan_buffer, scan_newline):
	Use bool for boolean.
	* keyboard.c (timers_run, swallow_events)
	(detect_input_pending_run_timers):
	* process.c (wait_reading_process_output):
	Use unsigned for counter where wraparound-on-overflow is desired,
	since unsigned is guaranteed to have that behavior and signed is not.
	(read_char): Use ptrdiff_t for string length.
	(get_input_pending): Remove first argument, since it was always
	the same pointer-to-int (now pointer-to-boolean) &input_pending,
	and behave as if it had that value.  Return new value of
	input_pending.  All callers changed.
	* keyboard.h (struct kboard): Use unsigned : 1 for boolean member
	immediate_echo.  Use ptrdiff_t for echo_after_prompt, since it's
	a string length.
	* keymap.c (push_key_description): Omit last arg, which was always 1.
	All callers changed.

390 391
	* regex.c (immediate_quit) [emacs]: Remove duplicate decl.

392 393 394 395 396
2012-10-10  Juanma Barranquero  <lekktu@gmail.com>

	* makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
	($(BLD)/term.$(O)): Update dependencies.

397 398 399 400 401 402
2012-10-10  Dmitry Antipov  <dmantipov@yandex.ru>

	* alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
	* lisp.h (enum pvec_type): Adjust comments and omit explicit
	initializer for PVEC_NORMAL_VECTOR.

Paul Eggert's avatar
Paul Eggert committed
403 404 405 406 407 408 409
2012-10-10  Paul Eggert  <eggert@cs.ucla.edu>

	Clean out old termopts cruft.
	* termopts.h (flow_control, meta_key): Remove unused decls.
	* dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
	Don't include termopts.h.

410 411 412 413
2012-10-10  Dmitry Antipov  <dmantipov@yandex.ru>

	* alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.

414 415 416 417
2012-10-10  Paul Eggert  <eggert@cs.ucla.edu>

	* commands.h (immediate_quit): Remove duplicate decl.

418 419 420 421 422
2012-10-09  Jan Djärv  <jan.h.d@swipnet.se>

	* nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
	caching.
	(nsfont_open): Remove setting of Vfonts_in_cache.
Juanma Barranquero's avatar
Juanma Barranquero committed
423
	(syms_of_nsfont): Remove initialization of Vfonts_in_cache.
424

425 426
2012-10-09  Eli Zaretskii  <eliz@gnu.org>

427 428 429 430
	* w32fns.c (w32_last_error): Change the return value to DWORD, to
	match what GetLastError returns.  Explain why the function is
	needed.

431 432 433
	* frame.c (delete_frame): Rename local variable 'tooltip_frame' to
	'is_tooltip_frame', to avoid confusion with its global namesake.

434 435 436
2012-10-08  Daniel Colascione  <dancol@dancol.org>

	* xdisp.c (start_hourglass): Call w32_note_current_window when
437 438
	HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
	build that caused Emacs to display the hourglass cursor forever.
439

Glenn Morris's avatar
Glenn Morris committed
440 441 442 443 444
	* w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
	which is broken under remote desktop, calculate the number of
	colors available for a display based on the display's number of
	planes and number of bits per pixel per plane.  (bug#10397).

445
2012-10-08  Jan Djärv  <jan.h.d@swipnet.se>
Glenn Morris's avatar
Glenn Morris committed
446

447 448 449 450 451
	* nsfont.m (Vfonts_in_cache): New variable.
	(nsfont_open): Use unsignedLongLongValue for cache in case wide ints
	are used.  Add cached fonts to Vfonts_in_cache.
	(syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.

452 453
2012-10-08  Juanma Barranquero  <lekktu@gmail.com>

454 455
	* makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
	in nt/config.nt.
456 457 458
	(FONT_H): Define after FRAME_H.
	($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
	Update dependencies.
459

460 461
	* w32term.c: Remove leftover declaration of keyboard_codepage.

462 463
2012-10-08  Eli Zaretskii  <eliz@gnu.org>

464 465 466 467
	* makefile.w32-in (FONT_H): Add $(FRAME_H).
	(W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
	($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
	(GLOBAL_SOURCES): Add cygw32.c.
Glenn Morris's avatar
Glenn Morris committed
468 469 470 471 472 473
	($(BLD)/unexw32.$(O)):
	($(BLD)/w32.$(O)):
	($(BLD)/w32console.$(O)):
	($(BLD)/w32fns.$(O)):
	($(BLD)/w32heap.$(O)):
	($(BLD)/w32menu.$(O)):
474
	($(BLD)/w32proc.$(O)): Add w32common.h.
475

476 477 478 479
	* w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
	'const char *'.
	(x_to_w32_color): Don't modify the argument, modify a copy instead.

Daniel Colascione's avatar
Daniel Colascione committed
480 481 482 483 484 485 486 487 488 489
2012-10-08  Daniel Colascione  <dancol@dancol.org>

	* w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
	(WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
	accidental message numbering hole.  Change other messages to
	match.

	* w32select.h (HAVE_W32SELECT): Remove.

	* w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
Juanma Barranquero's avatar
Juanma Barranquero committed
490
	w32common.h instead of w32heap.h.
Daniel Colascione's avatar
Daniel Colascione committed
491 492 493 494 495 496 497 498 499 500

	* w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
	(get_allocation_unit, get_processor_type, get_w32_major_version)
	(get_w32_minor_version, sysinfo_cache, osinfo_cache)
	(w32_major_version, w32_minor_version, w32_build_number, OS_9X)
	(OS_NT, os_subtype, cache_system_info): Move declarations to
	w32common.

	* w32heap.c: Include w32common.h.
	(sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
501 502
	(w32_minor_version, w32_build_number, w32_subtype):
	Remove duplicate definitions.
Daniel Colascione's avatar
Daniel Colascione committed
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532

	* w32fns.c: Include w32common.h; include w32heap.h only in
	WINDOWSNT.

	(Fx_file_dialog): Clarify comment on GetOpenFileName structure.
	Use `report_file_error' instead of `error' in order to better
	inform users of what went wrong.  Increase NTGUI_UNICODE file
	dialog box file name length to 32k, the maximum allowed by the NT
	kernel.

	* w32common.h: New file.
	(ROUND_UP, ROUND_DOWN, get_page_size)
	(get_allocation_unit, get_processor_type, get_w32_major_version)
	(get_w32_minor_version, sysinfo_cache, osinfo_cache)
	(w32_major_version, w32_minor_version, w32_build_number, OS_9X)
	(OS_NT, os_subtype, cache_system_info): Move here.

	* unexw32.c, unexcw.c: Include w32common.h.

	* emacs.c (main): Use (defined (WINDOWSNT) || defined
	HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
	to call syms_of_w32select.

	* cygw32.h: Remove obsolete EXFUN declarations.

	* cygw32.c (Qutf_16_le): Rename to Qutf_16le.

	* Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
	of w32inevt.o from SOME_MACHINE_OBJECTS.

533 534 535 536 537
2012-10-08  Daniel Colascione  <dancol@dancol.org>

	* image.c: Permanent fix for JPEG compilation issue --- limit
	jpeglib `boolean' redefinition to Cygwin builds.

538 539
2012-10-08  Eli Zaretskii  <eliz@gnu.org>

540 541
	* image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.

542 543 544
	* emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
	Cygwin.

545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 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 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612
2012-10-08  Daniel Colascione  <dancol@dancol.org>

	* xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
	w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
	w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
	w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
	keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
	emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
	Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
	operating system.  defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
	now a supported configuration.

	* Makefile.in: consolidate image variables into LIBIMAGE; add
	W32_OBJ and W32_LIBS. Compile new files.

	* conf_post.h:
	(_DebPrint) declare tracing facility for W32 debugging.  We need
	to unify tracing later.

	(NTGUI_UNICODE) Define when compiling for Cygwin to allow the
	unconditional use of W32 Unicode functions.  Cygwin runs only on
	100% Unicode operating systems.

	* cygw32.c: New file.  Define Cygwin-specific facilities.
	(Fcygwin_convert_path_to_windows)
	(Fcygwin_convert_path_from_windows): New user functions for
	accessing Cygwin path-munging routines.

	* cygw32.h: New file.
	(WCSDATA, to_unicode, from_unicode): Define facilities for storing
	UTF-16LE strings temporarily inside non-Lisp-visible string
	objects.

	(w32_strerror): Just what it says on the tin.

	* emacs.c: Make the NS fork-then-exec code for daemon-launching
	also run for Cygwin; both systems have the same problem with using
	GUI facilities in a forked child.  Also call syms_of_cygw32,
	syms_of_w32select in correct places.

	(DAEMON_MUST_EXEC): new macro defined to signal that a platform
	needs fork-then-exec for daemon launching.

	* font.h: Include frame.h.

	* image.c: Use the image library cache machinery only when we're
	compiling for native WINDOWSNT; Cygwin can use shared libraries
	like any other Unixlike system.

	* keyboard.c: Clarify a comment regarding the input loop.

	* menu.c: When NTGUI_UNICODE is defined, use Unicode menu
	functions directly instead of trying to detect at runtime that our
	host operating system supports them.  We make this change for two
	reasons: Cygwin lacks support for the multibyte character
	conversion functions used by the legacy menu code, and Cygwin
	never needs to rely on non-Unicode APIs.

	* unexw32.c (hinst): Declare extern.

	* w32.c: Change header order;
	(w32_strerror): Move to w32fns.c because we need it for
	non-WINDOWSNT builds.

	* w32.h: Add #error macro to make sure we don't include w32.h for
	Cygwin builds.  Remove w32select declarations.

	* w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
Juanma Barranquero's avatar
Juanma Barranquero committed
613
	w32fns.c.  w32console.c is WINDOWSNT-only.
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682

	* w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
	NTGUI_UNICODE tweaks.  (See above.) Change _snprintf to the more
	POSIXy alternative.
	(faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
	(w32_major_version, w32_minor_version, w32_build_number)
	(os_subtype, sound_type): Define here
	(w32_defined_color): Make color parameter const for consistency
	with other _defined_color functions.
	(w32_createwindow): Unconditionally call w32_init_class instead of
	doing so only when hprevinst is non-NULL.  Plumbing hprevinst
	through the code is complex and unnecessary because class
	registration is practically free.
	(w32_name_of_message): New EMACSDEBUG-only function.
	(Fset_message_beep): Move here
	(Fx_open_connection): Require that the display name for Windows be
	"w32" for consistency, emacsclient disambiguation, and maybe, one
	day, multi-window-system support.
	(file_dialog_callback): NTGUI_UNICODE changes; encode and decode
	Cygwin files for W32 GUI facilities, since these clearly don't
	expect Cygwin names.
	(_DebPrint): Define.
	(w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
	(w32_kbd_patch_key, w32_sys_ring_bell): Move here.
	(Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
	(w32_last_error): Remove.

	* w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.

	* w32heap.c (syspage_mask): Declare here.
	(cache_system_info): Remove.

	* w32inevt.c (faked_key): Define globally, not statically.
	(w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
	(w32_console_toggle_lock_key): Move to w32fns.c.

	* w32menu.c: Include setjmp.h.  NTGUI_UNICODE changes throughout.

	* w32proc.c (_DebPrint): Move to w32fns.c.
	* w32select.c: Include string.h, stdio.h for Cygwin.
	* w32select.h: New File.

	* w32term.c: Include io.h for non-CYGWIN builds; needed for
	get_osfhandle.
	(w32_message_fd): New variable.  Under Cygwin, holds the file
	descriptor the system used to tell us about pending thread
	messages.

	(w32_init_term): Remove incorrect calls to fcntl and init_sigio
	that prevented compilation under non-WINDOWSNT systems.

	(w32_initialize): Open /dev/windows and assign it to
	w32_message_fd.  Provide w32 feature.

	* w32term.h: Include frame.h, atimer.h.  Declare various frame functions.
	(WM_EMACS_INPUT_READY): add.
	(prepend_msg, w32_message_fd): Declare globally.

	* w32xfns.c:
	(keyboard_handle): Use only when WINDOWSNT.
	(notify_msg_ready): New function.  Posts a message to the main
	thread's message queue under CYGWIN, which wakes up the main
	thread from select(2) by making the /dev/windows file descriptor
	ready.  Under WINDOWSNT, it sets an event the same way the old
	code did.

	(post, prepend_msg): Actually call notify_msg_ready instead of
	setting the input event directly.

683 684 685 686 687 688
2012-10-07  Eli Zaretskii  <eliz@gnu.org>

	* ralloc.c (relinquish): If a heap is ready to be relinquished,
	but it still has blocs in it, don't return it to the system,
	instead of aborting.  (Bug#12402)

Jan Djärv's avatar
Jan Djärv committed
689 690
2012-10-07  Jan Djärv  <jan.h.d@swipnet.se>

691
	* nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
692

693 694
	* nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
	MAC_OS_X_VERSION_10_6.
695 696
	(syms_of_nsterm): Remove comment about Panther and above for
	ns-antialias-text.
697 698 699 700 701 702 703
	* nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
	(EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
	(struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.

	* nsselect.m (ns_string_from_pasteboard): Remove check for >=
	MAC_OS_X_VERSION_10_4.

704 705
	* nsmenu.m (fillWithWidgetValue:): Remove code for <
	MAC_OS_X_VERSION_10_2.
706 707 708 709 710 711

	* nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.

	* nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
	(ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.

Jan Djärv's avatar
Jan Djärv committed
712 713
	* nsterm.m (ns_in_resize): Remove (Bug#12479).
	(ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
714 715
	(ns_clear_frame, sendEvent, windowDidResize, drawRect:):
	Remove ns_in_resize check.
Jan Djärv's avatar
Jan Djärv committed
716 717 718
	(ns_clear_frame_area): Remove resize handle code.

	* nsfns.m (ns_in_resize): Remove.
719 720
	(x_set_icon_name, ns_set_name, ns_set_name_as_filename):
	Remove ns_in_resize check.
Jan Djärv's avatar
Jan Djärv committed
721

Paul Eggert's avatar
Paul Eggert committed
722 723 724 725 726 727 728 729 730 731
2012-10-07  Paul Eggert  <eggert@cs.ucla.edu>

	Improve sys_siglist detection.
	* sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
	defined as a macro, as is done in Solaris.
	(sys_siglist_entries): New macro.
	(save_strsignal): Use it.
	* syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
	GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.

732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747
2012-10-06  Jan Djärv  <jan.h.d@swipnet.se>

	* nsfns.m (Fx_create_frame): Call x_default_parameter with
	fullscreen/Fullscreen.

	* nsterm.h (EmacsView): Rename tbar_height to tibar_height.
	tobar_height is new.

	* nsterm.m (x_make_frame_visible): Check for fullscreen.
	(ns_fullscreen_hook): Activate old style fullscreen with a timer.
	(ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
	(windowDidResize:): Check for correct window if old style fullscreen.
	Capitalize word in comment.  Remove incorrect comment.
	(initFrameFromEmacs:): tbar_height renamed tibar_height.
	(windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
	error in drawing background.
Juanma Barranquero's avatar
Juanma Barranquero committed
748
	(toggleFullScreen:): Remove comment.  Rearrange calls.
749 750 751 752
	Set toolbar values to zero, save old height in tobar_height.
	Restore tool bar height when leaving fullscreen.
	(canBecomeMainWindow): New function.

753 754 755 756
2012-10-06  Paul Eggert  <eggert@cs.ucla.edu>

	* keyboard.c (read_char): Remove unnecessary 'volatile's and label.

757 758
2012-10-05  Eli Zaretskii  <eliz@gnu.org>

759 760
	* w32proc.c (stop_timer_thread): Fix declaration of 'err'.

761
	* w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
762 763
	that time stamps of directories could also be changed.
	Don't request the too broad GENERIC_WRITE, only the more restrictive
764 765 766 767 768
	FILE_WRITE_ATTRIBUTES access rights.

	* fileio.c (Fset_file_times): Special-case ignoring errors for
	directories only on MSDOS, not on MS-Windows.

769
2012-10-05  Ikumi Keita  <ikumi@ikumi.que.jp>  (tiny change)
770 771 772

	* minibuf.c (Fcompleting_read): Doc fix.  (Bug#12555)

773 774 775 776 777
2012-10-04  Eli Zaretskii  <eliz@gnu.org>

	* w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
	see whether CreateFile failed.

778 779 780 781 782 783
2012-10-04  Paul Eggert  <eggert@cs.ucla.edu>

	* profiler.c (handle_profiler_signal): Inhibit pending signals too,
	to avoid similar races.
	* keyboard.c (pending_signals): Now bool, not int.

784 785 786 787 788 789 790 791 792 793 794
	Port timers to OpenBSD, plus check for timer failures.
	OpenBSD problem reported by Han Boetes.
	* profiler.c (setup_cpu_timer): Check for failure of timer_settime
	and/or setitimer.
	(Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
	* syssignal.h (HAVE_ITIMERSPEC): New macro.  This is for platforms
	like OpenBSD, which has timer_settime but does not declare it.
	OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
	whether to use itimerspec-related primitives.  All uses of
	HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.

795 796 797 798 799
2012-10-02  Paul Eggert  <eggert@cs.ucla.edu>

	* profiler.c (handle_profiler_signal): Fix a malloc race
	that caused Emacs to hang on Fedora 17 when profiling Lisp.

800 801 802 803
2012-10-02  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (windowDidEnterFullScreen): Remove fprintf.

804 805 806 807 808
2012-10-02  Eli Zaretskii  <eliz@gnu.org>

	* w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
	consistent with the change in return value of 'safe_strsignal'.

809 810
2012-10-02  Paul Eggert  <eggert@cs.ucla.edu>

811 812 813 814 815 816 817 818 819 820 821 822
	Prefer plain 'static' to 'static inline' (Bug#12541).
	* bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
	(bidi_set_sor_type, bidi_push_embedding_level)
	(bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
	(bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
	(bidi_cache_search, bidi_cache_ensure_space)
	(bidi_cache_iterator_state, bidi_cache_find)
	(bidi_peek_at_next_level, bidi_set_paragraph_end)
	(bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
	(bidi_explicit_dir_char, bidi_resolve_neutral_1):
	Now 'static', not 'static inline'.

823 824 825 826 827 828 829 830 831
	Count overruns when profiling; change units to ns.
	* profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
	Give extra weight to samples after overruns, to attempt to count
	the time more accurately.
	(setup_cpu_timer): Change sampling interval units from ms to ns, since
	the underlying primitives nominally do ns.
	(Fprofiler_cpu_start): Document the change.  Mention that
	the sampling intervals are only approximate.

832 833 834 835 836 837 838 839 840
2012-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>

	* frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.

	* coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
	case for the special 0 coding-system.

	* buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
	(Fmake_overlay): Remove redundant tests.
841
	(fix_start_end_in_overlays): Remove redundant recentering.
842

843 844 845 846 847
2012-10-02  Juanma Barranquero  <lekktu@gmail.com>

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

848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866
2012-10-01  Paul Eggert  <eggert@cs.ucla.edu>

	Fix a malloc race condition involving strsignal.
	A signal can arrive in the middle of a malloc, and Emacs's signal
	handler can invoke strsignal, which can invoke malloc, which is
	not portable.  This race condition bug makes Emacs hang on GNU/Linux.
	Fix it by altering the signal handler so that it does not invoke
	strsignal.
	* emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
	* process.c (status_message): Use const pointer, in case strsignal
	is #defined to safe_strsignal.
	* sysdep.c (sys_siglist, init_signals): Always define and
	initialize a substitute sys_siglist if the system does not define
	one, even if HAVE_STRSIGNAL.
	(safe_strsignal): Rename from strsignal.  Always define,
	using sys_siglist.  Return a const pointer.
	* syssignal.h (safe_strsignal): New decl.
	(strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.

867 868 869 870 871
2012-10-01  Eli Zaretskii  <eliz@gnu.org>

	* w32proc.c (timer_loop): Fix code that waits for timer
	expiration, to avoid high CPU usage.

872 873 874 875 876
2012-10-01  Stefan Monnier  <monnier@iro.umontreal.ca>

	* fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
	(sweep_weak_table): Remove redundant prototypes.

877 878 879 880 881 882
2012-10-01  Fabrice Popineau  <fabrice.popineau@gmail.com>

	* emacs.c: Move the inclusion of TERM_HEADER after including
	windows.h on WINDOWSNT.  This avoids compilation problems with
	MSVC.

883 884
2012-10-01  Eli Zaretskii  <eliz@gnu.org>

885 886 887 888 889 890 891 892 893
	* unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
	(RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
	(RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
	as the previous version used 'void *'.

	* ralloc.c (ROUNDUP): Fix last change.
	(MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
	'size_t'.

894 895 896 897 898 899 900
	* w32proc.c <disable_itimers>: New static flag.
	(init_timers): Initialize it to zero, after creating the critical
	sections used by the timer threads.
	(term_timers): Set to 1 before deleting the critical sections.
	(getitimer, setitimer): If disable_itimers is non-zero, return an
	error indication without doing anything.  Reported by Fabrice
	Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
901 902 903 904
	(alarm) [HAVE_SETITIMER]: Be more conformant to the expected
	return results.
	[!HAVE_SETITIMER]: Behave as the previous version that didn't
	support timers.
905 906 907 908 909

	* emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
	term_ntproc after all the other bookkeeping, to get timers working
	as long as possible.

910 911
2012-10-01  Paul Eggert  <eggert@cs.ucla.edu>

912 913 914 915
	* xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
	Suggested by Juri Linkov in
	<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.

916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999
	Prefer plain 'static' to 'static inline' (Bug#12541).
	With static functions, modern compilers inline pretty well by
	themselves; advice from programmers often hurts as much as it helps.
	On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
	this change shrinks the text size of the Emacs executable by 1.1%
	without affecting CPU significantly in my benchmark.
	* alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
	(live_float_p, live_misc_p, live_vector_p, live_buffer_p)
	(mark_maybe_object, mark_maybe_pointer, bounded_number):
	* buffer.c (bset_abbrev_mode, bset_abbrev_table)
	(bset_auto_fill_function, bset_auto_save_file_format)
	(bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
	(bset_bidi_display_reordering, bset_buffer_file_coding_system)
	(bset_cache_long_line_scans, bset_case_fold_search)
	(bset_ctl_arrow, bset_cursor_in_non_selected_windows)
	(bset_cursor_type, bset_display_table, bset_extra_line_spacing)
	(bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
	(bset_fringe_indicator_alist, bset_fringes_outside_margins)
	(bset_header_line_format, bset_indicate_buffer_boundaries)
	(bset_indicate_empty_lines, bset_invisibility_spec)
	(bset_left_fringe_width, bset_major_mode, bset_mark)
	(bset_minor_modes, bset_mode_line_format, bset_mode_name)
	(bset_name, bset_overwrite_mode, bset_pt_marker)
	(bset_right_fringe_width, bset_save_length)
	(bset_scroll_bar_width, bset_scroll_down_aggressively)
	(bset_scroll_up_aggressively, bset_selective_display)
	(bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
	(bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
	(set_buffer_overlays_after):
	* category.c (bset_category_table):
	* charset.c (read_hex):
	* coding.c (produce_composition, produce_charset)
	(handle_composition_annotation, handle_charset_annotation)
	(char_encodable_p):
	* dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
	(assign_row, set_frame_matrix_frame, make_current)
	(add_row_entry):
	* eval.c (set_specpdl_symbol, set_specpdl_old_value):
	* fns.c (maybe_resize_hash_table):
	* frame.c (fset_buffer_predicate, fset_minibuffer_window):
	* gmalloc.c (register_heapinfo):
	* image.c (lookup_image_type):
	* intervals.c (set_interval_object, set_interval_left)
	(set_interval_right, copy_interval_parent, rotate_right)
	(rotate_left, balance_possible_root_interval):
	* keyboard.c (kset_echo_string, kset_kbd_queue)
	(kset_keyboard_translate_table, kset_last_prefix_arg)
	(kset_last_repeatable_command, kset_local_function_key_map)
	(kset_overriding_terminal_local_map, kset_real_last_command)
	(kset_system_key_syms, clear_event, set_prop):
	* lread.c (digit_to_number):
	* marker.c (attach_marker, live_buffer, set_marker_internal):
	* nsterm.m (ns_compute_glyph_string_overhangs):
	* process.c (pset_buffer, pset_command)
	(pset_decode_coding_system, pset_decoding_buf)
	(pset_encode_coding_system, pset_encoding_buf, pset_filter)
	(pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
	(pset_status, pset_tty_name, pset_type, pset_write_queue):
	* syntax.c (bset_syntax_table, dec_bytepos):
	* terminal.c (tset_param_alist):
	* textprop.c (interval_has_some_properties)
	(interval_has_some_properties_list):
	* window.c (wset_combination_limit, wset_dedicated)
	(wset_display_table, wset_hchild, wset_left_fringe_width)
	(wset_left_margin_cols, wset_new_normal, wset_new_total)
	(wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
	(wset_right_fringe_width, wset_right_margin_cols)
	(wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
	(wset_vertical_scroll_bar_type, wset_window_parameters):
	* xdisp.c (wset_base_line_number, wset_base_line_pos)
	(wset_column_number_displayed, wset_region_showing)
	(window_box_edges, run_window_scroll_functions)
	(append_glyph_string_lists, prepend_glyph_string_lists)
	(append_glyph_string, set_glyph_string_background_width)
	(append_glyph, append_composite_glyph)
	(take_vertical_position_into_account):
	* xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
	(face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
	(lface_hash, lface_same_font_attributes_p, lookup_face):
	* xml.c (libxml2_loaded_p):
	* xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
	(x_set_glyph_string_clipping, x_clear_glyph_string_rect):
	Now 'static', not 'static inline'.

Paul Eggert's avatar
Paul Eggert committed
1000 1001 1002 1003
	* bidi.c: Tune.
	(bidi_copy_it): Do the whole copy with a single memcpy.
	(bidi_char_at_pos): Merge the two STRING_CHAR calls into one.

1004 1005 1006 1007 1008 1009
	Revert the FOLLOW-SYMLINKS change for file-attributes.
	Doing it right would require several changes to Tramp, and there's
	not enough time to get that tested before the freeze today.
	* dired.c (directory_files_internal, Ffile_attributes):
	Undo last change.

1010 1011 1012 1013 1014
	* frame.c (x_report_frame_params): Port better to wider ints.
	Do not assume that EMACS_UINT is the same width as uprintmax_t,
	or that pointers can be printed in 15 decimal digits.
	Avoid GCC warnings if EMACS_UINT is wider than a pointer.

1015 1016 1017 1018 1019 1020
2012-09-30  Fabrice Popineau  <fabrice.popineau@supelec.fr>

	Support x64 build on MS-Windows.
	* w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
	(SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
	compatibility with x64.
Fabrice Popineau's avatar
Fabrice Popineau committed
1021
	(x_get_focus_frame): Add prototype.
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087

	* w32term.c (w32_draw_underwave): Don't use GCC extensions for
	defining an XRectangle structure.

	* w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
	arithmetics for compatibility with x64.

	* w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
	compatibility with x64.

	* w32heap.h: Adjust prototypes and declarations.

	* w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
	(round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
	DWORD, long, and unsigned long, for compatibility with x64.
	(allocate_heap) [_WIN64]: Reserve 32GB of memory.
	(sbrk): Argument is now of type ptrdiff_t.

	* w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
	less than 0x0500.
	(w32_msg_pump): Use WPARAM type for 'result'.

	* w32.c (init_environment, get_emacs_configuration): Support AMD64
	architecture.
	(init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
	compatibility with x64.

	* vm-limit.c (lim_data): Now size_t.
	(check_memory_limits): Adjust prototypes of real_morecore and
	__morecore to receive argument of type ptrdiff_t.  Use size_t for
	five_percent and data_size.

	* unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
	variables, for compatibility with x64.
	(rva_to_section, offset_to_section, relocate_offset)
	(OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
	(PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
	(copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
	for compatibility with x64.

	* sysdep.c (STDERR_FILENO): Define if not already defined.

	* ralloc.c (real_morecore): Argument type is now ptrdiff_t.
	(__morecore): Argument type is now ptrdiff_t.
	(ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
	(relinquish): Use ptrdiff_t type for 'excess'.
	(r_alloc_sbrk): Argument type is now ptrdiff_t.

	* makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
	(bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
	instead of a literal number.

	* gmalloc.c [WINDOWSNT]: Include w32heap.h.
	(min): Define only if not already defined.

	* frame.c (x_report_frame_params): Use EMACS_UINT for the return
	value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
	hosts.

	* image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
	'bitmaps' is a pointer.

	* dispextern.h (x_bitmap_pixmap): Adjust prototype.

	* alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.

1088 1089 1090 1091 1092 1093
2012-09-30  Paul Eggert  <eggert@cs.ucla.edu>

	file-attributes has a new optional arg FOLLOW-SYMLINKS.
	* dired.c (directory_files_internal, Ffile_attributes):
	New arg follow_symlinks.  All uses changed.

1094 1095 1096 1097
2012-09-30  Stefan Monnier  <monnier@iro.umontreal.ca>

	* .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.

1098 1099 1100 1101 1102 1103
2012-09-30  Eli Zaretskii  <eliz@gnu.org>

	Support atimers and CPU profiler via profile.c on MS-Windows.
	* w32proc.c (sig_mask, crit_sig): New static variables.
	(sys_signal): Support SIGALRM and SIGPROF.
	(sigemptyset, sigaddset, sigfillset, sigprocmask)
1104
	(pthread_sigmask, setpgrp): Move here from w32.c.  sigaddset,
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125
	sigfillset, and sigprocmask are no longer no-ops.
	(sigismember): New function.
	(struct itimer_data): New definition.
	(ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
	(crit_prof): New static variables.
	(MAX_SINGLE_SLEEP): New definition.
	(timer_loop, stop_timer_thread, term_timers, init_timers)
	(start_timer_thread, getitimer, setitimer): New functions.
	(alarm): No longer a no-op, calls setitimer.

	* w32.c (term_ntproc): Call term_timers.
	(init_ntproc): Make sure all signals are unblocked at startup, to
	erase any traces of dumping.  Call init_timers.

	* w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
	Windows-specific code to display the hourglass mouse pointer is no
	longer used.
	(w32_wnd_proc): Remove code that handled the WM_TIMER message due
	to hourglass timer expiration.
	(start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
	Remove, no longer used.
1126 1127
	(w32_note_current_window, show_hourglass, hide_hourglass):
	New functions, in support of hourglass cursor display similar to other
1128 1129 1130 1131 1132 1133 1134 1135 1136
	window systems.
	(syms_of_w32fns): Don't initialize hourglass_timer.

	* xdisp.c (start_hourglass, cancel_hourglass): Now used on
	WINDOWSNT as well.
	(start_hourglass) [WINDOWSNT]: Call w32_note_current_window.

	* w32.h (init_timers, term_timers): Add prototypes.

1137 1138 1139 1140 1141
2012-09-30  Kenichi Handa  <handa@gnu.org>

	* coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
	to the buffer relocation which may be caused by ccl_driver.

1142 1143
2012-09-30  Jan Djärv  <jan.h.d@swipnet.se>

Jan Djärv's avatar
Jan Djärv committed
1144 1145 1146 1147 1148 1149 1150 1151 1152
	* xfns.c (Fx_file_dialog): Update comment.

	* w32fns.c (Fx_file_dialog): Update comment.

	* nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
	Initialize panel name field if OSX >= 10.6.

	* fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.

1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170
	* nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.

	* nsterm.m (NEW_STYLE_FS): New define.
	(ns_fullscreen_hook, windowWillEnterFullScreen)
	(windowDidEnterFullScreen, windowWillExitFullScreen)
	(windowDidExitFullScreen, toggleFullScreen, handleFS)
	(setFSValue): New functions.
	(EmacsFSWindow): New implementation.
	(canBecomeKeyWindow): New function for EmacsFSWindow.
	(ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
	(dealloc): Release nonfs_window if in fullscreen.
	(updateFrameSize:): Call windowDidMove to update top/left.
	(windowWillResize:toSize:): Check if frame is still maximized.
	(initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
	next_maximized, maximized_width, maximized_height and nonfs_window.
	Call setCollectionBehavior if NEW_STYLE_FS.  Initialize bwidth and
	tbar_height.
	(windowWillUseStandardFrame:defaultFrame:): Update frame parameter
Juanma Barranquero's avatar
Juanma Barranquero committed
1171
	fullscreen.  Set maximized_width/height.  Act on next_maximized.
1172 1173 1174 1175 1176 1177

	* nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
	(EmacsView): Add variables for fullscreen.
	(handleFS, setFSValue, toggleFullScreen): New in EmacsView.
	(EmacsFSWindow): New interface for fullscreen.

1178 1179 1180 1181
2012-09-30  Juanma Barranquero  <lekktu@gmail.com>

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

1182 1183 1184 1185
2012-09-30  Chong Yidong  <cyd@gnu.org>

	* fns.c (Frandom): Doc fix.

1186 1187 1188 1189 1190
2012-09-30  Martin Rudalics  <rudalics@gmx.at>

	* window.c (Vwindow_combination_limit): New default value.
	(Qwindow_size): New symbol replacing Qtemp_buffer_resize.

1191 1192 1193 1194 1195 1196
2012-09-30  Paul Eggert  <eggert@cs.ucla.edu>

	* syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
	Suggested by Eli Zaretskii in
	<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.

1197 1198 1199 1200 1201
2012-09-30  Eli Zaretskii  <eliz@gnu.org>

	* profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
	HAVE_TIMER_SETTIME is defined.

1202 1203
2012-09-30  Paul Eggert  <eggert@cs.ucla.edu>

1204 1205 1206 1207 1208 1209 1210 1211
	Profiler improvements: more-accurate timers, overflow checks.
	* profiler.c: Don't include stdio.h, limits.h, sys/time.h,
	signal.h, setjmp.h.  Include systime.h instead.
	(saturated_add): New function.
	(record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
	(record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
	(profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
	New static vars.
1212
	(enum profiler_cpu_running): New enum.
1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237
	(profiler_cpu_running): Now of that enum type, not bool.
	All uses changed to store the new value.
	(handle_profiler_signal): Rename from sigprof_handler_1,
	for consistency with other handlers.  Do not check whether
	cpu_log is a hash-table if garbage collecting, since it
	doesn't matter in that case.
	(deliver_profiler_signal): Rename from sigprof_handler,
	for consistency with other handlers.
	(setup_cpu_timer): New function, with much of what used to be in
	Fprofiler_cpu_start.  Check for out-of-range argument.
	Prefer timer_settime if available, and prefer
	thread cputime clocks, then process cputime clocks, then
	monotonic clocks, to the old realtime clock.  Use make_timeval
	to round more-correctly when falling back to setitimer.
	(Fprofiler_cpu_start): Use it.
	(Fprofiler_cpu_stop): Prefer timer_settime if available.
	Don't assume that passing NULL as the 2nd argument of setitimer
	is the same as passing a pointer to all-zero storage.
	Ignore SIGPROF afterwards.
	(malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
	* sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
	non-fatal signal handlers.  Ignore SIGPROF on startup.
	* syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
	in profiler.c, since sysdep.c now uses it.

1238 1239 1240 1241
	* sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
	Suggested by Eli Zaretskii in
	<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.

1242 1243 1244 1245
2012-09-29  Juanma Barranquero  <lekktu@gmail.com>

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

1246 1247 1248 1249 1250 1251 1252 1253 1254
2012-09-29  Stefan Monnier  <monnier@iro.umontreal.ca>

	* lisp.h (struct backtrace): Remove indirection for `function' field.
	* xdisp.c (redisplay_internal):
	* profiler.c (record_backtrace, sigprof_handler_1):
	* alloc.c (Fgarbage_collect):
	* eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
	(Fbacktrace_frame): Adjust accordingly.

1255
2012-09-28  Glenn Morris  <rgm@gnu.org>
Glenn Morris's avatar
Glenn Morris committed
1256 1257 1258 1259

	* eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
	(Frun_hook_with_args_until_failure): Doc fixes.

1260 1261 1262 1263 1264
2012-09-28  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
	Qautomatic_redisplay and change the symbol name.  All users changed.

1265 1266 1267 1268
2012-09-28  Tomohiro Matsuyama  <tomo@cx4a.org>

	* profiler.c (sigprof_handler): Fix race condition.

1269 1270 1271 1272
2012-09-28  Glenn Morris  <rgm@gnu.org>

	* lread.c (lisp_file_lexically_bound_p): Handle #! lines.  (Bug#12528)

1273 1274 1275
2012-09-27  Paul Eggert  <eggert@cs.ucla.edu>

	Check more robustly for timer_settime.
1276 1277
	* Makefile.in (LIB_TIMER_TIME): New macro.
	(LIBES): Add it.
1278 1279 1280 1281
	* atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
	Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
	call timer_settime.

1282 1283 1284 1285
2012-09-26  Tomohiro Matsuyama  <tomo@cx4a.org>

	* profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.

1286 1287 1288 1289
2012-09-26  Juanma Barranquero  <lekktu@gmail.com>

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

1290 1291 1292 1293 1294 1295 1296 1297
2012-09-26  Paul Eggert  <eggert@cs.ucla.edu>

	* character.h (MAYBE_UNIFY_CHAR): Remove.
	* charset.c, charset.h (maybe_unify_char): Now static.
	* charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
	Since this stuff is now private to charset.c, there's no need for
	a public macro and no need to inline by hand.

Stefan Monnier's avatar
Stefan Monnier committed
1298 1299 1300
2012-09-26  Tomohiro Matsuyama  <tomo@cx4a.org>
            Stefan Monnier  <monnier@iro.umontreal.ca>
            Juanma Barranquero  <lekktu@gmail.com>
1301

Stefan Monnier's avatar
Stefan Monnier committed
1302 1303
	* profiler.c: New file.
	* Makefile.in (base_obj): Add profiler.o.
1304 1305
	* makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
	($(BLD)/profiler.$(O)): New target.
Stefan Monnier's avatar
Stefan Monnier committed
1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322
	* emacs.c (main): Call syms_of_profiler.
	* alloc.c (Qautomatic_gc): New constant.
	(MALLOC_PROBE): New macro.
	(xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
	(total_bytes_of_live_objects): New function.
	(Fgarbage_collect): Use it.  Record itself in backtrace_list.
	Call malloc_probe for the memory profiler.
	(syms_of_alloc): Define Qautomatic_gc.
	* eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
	race condition.
	(struct backtrace): Move definition...
	* lisp.h (struct backtrace): ..here.
	(Qautomatic_gc, profiler_memory_running): Declare vars.
	(malloc_probe, syms_of_profiler): Declare functions.
	* xdisp.c (Qautomatic_redisplay): New constant.
	(redisplay_internal): Record itself in backtrace_list.
	(syms_of_xdisp): Define Qautomatic_redisplay.
1323

1324
2012-09-25  Eli Zaretskii  <eliz@gnu.org>
1325 1326 1327 1328
2012-09-25  Juanma Barranquero  <lekktu@gmail.com>

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

1329 1330 1331 1332 1333 1334
2012-09-25  Paul Eggert  <eggert@cs.ucla.edu>

	Prefer POSIX timers if available.
	They avoid a race if the timer is too close to the current time.
	* atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
	(set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
1335
	(init_atimer) [SIGEV_SIGNAL]: Initialize them.
1336

1337 1338 1339 1340 1341 1342 1343
2012-09-25  Eli Zaretskii  <eliz@gnu.org>

	* coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
	CHAR_STRING_ADVANCE.
	(STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
	STRING_CHAR_ADVANCE.

1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361
2012-09-25  Juanma Barranquero  <lekktu@gmail.com>

	Move Vlibrary_cache to emacs.c and reset before dumping.

	* lisp.h (reset_image_types): Declare.
	[WINDOWSNT] (Vlibrary_cache): Declare.

	* image.c (reset_image_types): New function.

	* emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
	(syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
	(Fdump_emacs): Reset Vlibrary_cache and image_types.

	* w32.c (Vlibrary_cache): Do not define; moved to emacs.c
	(globals_of_w32) <Vlibrary_cache>: Do not initialize.

	* w32.h (Vlibrary_cache): Do not declare.

1362 1363
2012-09-25  Eli Zaretskii  <eliz@gnu.org>

1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387
	* w32proc.c (sys_signal): Handle all signals defined by the
	MS-Windows runtime, not just SIGCHLD.  Actually install the signal
	handlers for signals supported by Windows.  Don't override
	term_ntproc as the handler for SIGABRT.
	(sigaction): Rewrite to call sys_signal instead of duplicating its
	code.
	(sys_kill): Improve commentary.

	* w32.c (term_ntproc): Accept (and ignore) one argument, for
	consistency with a signature of a signal handler.  All callers
	changed.
	(init_ntproc): Accept an argument DUMPING.  If dumping, don't
	install term_ntproc as a signal handler for SIGABRT, as that
	should be done by the dumped Emacs.

	* w32.h (init_ntproc, term_ntproc): Adjust prototypes.

	* w32select.c (term_w32select): Protect against repeated
	invocation by setting clipboard_owner to NULL after calling
	DestroyWindow.

	* emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
	and term_ntproc to their modified signatures.

1388 1389 1390 1391 1392
	* character.c (char_string, string_char): Remove calls to
	MAYBE_UNIFY_CHAR.  See the discussion starting at
	http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
	for the details.

1393 1394 1395 1396
2012-09-25  Chong Yidong  <cyd@gnu.org>

	* xdisp.c (mode_line_inverse_video): Delete obsolete variable.

1397 1398 1399 1400 1401
2012-09-24  Stefan Monnier  <monnier@iro.umontreal.ca>

	* bytecode.c (exec_byte_code): Signal an error instead of aborting,
	when encountering an unknown bytecode.

1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439
2012-09-24  Paul Eggert  <eggert@cs.ucla.edu>

	image.c, indent.c: Use bool for booleans.
	* dispextern.h (struct image_type): Members valid_p, load, init
	now return bool, not int.  All uses changed.
	* image.c: Omit unnecessary static decls.
	(x_create_bitmap_mask, x_build_heuristic_mask):
	Return void, not int, since callers don't care about the return value.
	(x_create_bitmap_mask, define_image_type, valid_image_p)
	(struct image_keyword, parse_image_spec, image_spec_value)
	(check_image_size, image_background)
	(image_background_transparent, x_clear_image_1)
	(postprocess_image, lookup_image, x_check_image_size)
	(x_create_x_image_and_pixmap, xbm_image_p)
	(Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
	(xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
	(init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
	(xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
	(x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
	(png_image_p, init_png_functions, png_load_body, png_load)
	(jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
	(tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
	(init_gif_functions, gif_load, imagemagick_image_p)
	(imagemagick_load_image, imagemagick_load, svg_image_p)
	(init_svg_functions, svg_load, svg_load_image, gs_image_p)
	(gs_load):
	* nsimage.m (ns_load_image):
	* nsterm.m (ns_defined_color):
	* xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
	* xfns.c (x_defined_color):
	* xterm.c (x_alloc_lighter_color_for_widget)
	(x_alloc_nearest_color_1, x_alloc_nearest_color)
	(x_alloc_lighter_color):
	* indent.c (disptab_matches_widthtab, current_column)
	(scan_for_column, string_display_width, indented_beyond_p)
	(compute_motion, vmotion, Fvertical_motion):
	Use bool for booleans.

1440 1441 1442 1443
2012-09-24  Chong Yidong  <cyd@gnu.org>

	* chartab.c (Fset_char_table_default): Obsolete function removed.

1444 1445
2012-09-23  Paul Eggert  <eggert@cs.ucla.edu>

1446 1447 1448 1449 1450 1451 1452 1453
	Move pid_t related decls out of lisp.h.
	* lisp.h, syswait.h (record_child_status_change, wait_for_termination)
	(interruptible_wait_for_termination):
	Move these decls from lisp.h to syswait.h, since they use pid_t.
	Needed on FreeBSD; see Herbert J. Skuhra in
	<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
	* callproc.c: Include syswait.h.

1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478
	gnutls.c, gtkutil.c: Use bool for boolean.
	* gnutls.c (gnutls_global_initialized, init_gnutls_functions)
	(emacs_gnutls_handle_error):
	* gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
	(xg_hide_tooltip, xg_create_frame_widgets)
	(create_dialog, xg_uses_old_file_dialog)
	(xg_get_file_with_chooser, xg_get_file_with_selection)
	(xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
	(xg_item_label_same_p, xg_update_menubar)
	(xg_modify_menubar_widgets, xg_event_is_for_menubar)
	(xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
	(xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
	(is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
	(update_frame_tool_bar, free_frame_tool_bar):
	* gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
	* nsmenu.m (ns_update_menubar):
	* nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
	* xfns.c (Fx_show_tip) [USE_GTK]:
	Use bool for boolean.
	* gtkutil.c (xg_update_frame_menubar):
	* xmenu.c (update_frame_menubar):
	Return void, not int, since caller ignores return value.
	* gtkutil.c (xg_change_toolbar_position):
	Return void, not 1.

1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497
2012-09-23  Juanma Barranquero  <lekktu@gmail.com>

	* makefile.w32-in (BLOCKINPUT_H): Remove.
	(SYSSIGNAL_H): New macro.
	($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
	($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
	($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
	($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
	($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
	($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
	($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
	($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
	($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
	($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
	($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
	($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
	($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
	($(BLD)/w32xfns.$(O)): Update dependencies.

1498 1499 1500 1501 1502 1503 1504 1505 1506
2012-09-23  Eli Zaretskii  <eliz@gnu.org>

	* .gdbinit: Set breakpoint on terminate_due_to_signal, not on
	fatal_error_backtrace.

	* w32proc.c (sys_kill): Undo last change: don't do anything when
	invoked to deliver SIGABRT to our own process.  This is now
	handled by emacs_raise.

1507 1508 1509 1510 1511
2012-09-23  Juanma Barranquero  <lekktu@gmail.com>

	* w32term.c (w32_read_socket): Remove leftover reference to
	interrupt_input_pending.

Paul Eggert's avatar
Paul Eggert committed
1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522
2012-09-23  Paul Eggert  <eggert@cs.ucla.edu>

	Do not use SA_NODEFER.
	Problem reported by Dani Moncayo in
	<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
	* alloc.c (die):
	* sysdep.c (emacs_abort): Do not reset signal handler.
	* emacs.c (terminate_due_to_signal): Reset signal handler here.
	* sysdep.c (init_signals): Do not use SA_NODEFER.  It wasn't
	wanted even on POSIXish hosts, and it doesn't work on Windows.

1523 1524 1525 1526 1527
2012-09-23  Jan Djärv  <jan.h.d@swipnet.se>

	* xterm.c (x_term_init): Call fixup_locale before and after calling
	gtk_init (Bug#12392).

1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546
2012-09-23  Chong Yidong  <cyd@gnu.org>

	* w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
	Vdynamic_library_alist.

	* gnutls.c (init_gnutls_functions): Caller changed; remove arg.
	(Fgnutls_available_p): Caller changed.

	* xml.c (init_libxml2_functions, Flibxml_parse_html_region)
	(Flibxml_parse_xml_region): Likewise.

	* dispextern.h (struct image_type): Remove arg from init function.

	* image.c (Finit_image_library, lookup_image_type)
	(define_image_type): Remove now-unneeded second arg.
	(init_xpm_functions, init_png_functions, init_jpeg_functions)
	(init_tiff_functions, init_gif_functions, init_svg_functions):
	Arglist and w32_delayed_load calling convention changed.
	(gs_type): Remove init_gs_functions; there is no such function.
Chong Yidong's avatar
Chong Yidong committed
1547
	(valid_image_p, make_image): Fix caller to lookup_image_type.
1548

1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617
2012-09-23  Paul Eggert  <eggert@cs.ucla.edu>

	Simplify and avoid signal-handling races (Bug#12471).
	* alloc.c (die):
	* sysdep.c (emacs_abort) [HAVE_NTGUI]:
	Avoid recursive loop if there's a fatal error in the function itself.
	* atimer.c (pending_atimers):
	* blockinput.h: Don't include "atimer.h"; no longer needed.
	(interrupt_input_pending): Remove.  All uses removed.
	pending_signals now counts both atimers and ordinary interrupts.
	This is less racy than having three separate pending-signal flags.
	(block_input, unblock_input, totally_unblock_input, unblock_input_to)
	(input_blocked_p):
	Rename from their upper-case counterparts BLOCK_INPUT,
	UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
	INPUT_BLOCKED_P, and turn into functions.  All uses changed.
	This makes it easier to access volatile variables more accurately.
	(BLOCK_INPUT_RESIGNAL): Remove.  All uses replaced by unblock_input ().
	(input_blocked_p): Prefer this to 'interrupt_input_blocked', as
	that's more reliable if the code is buggy and sets
	interrupt_input_blocked to a negative value.  All uses changed.
	* atimer.c (deliver_alarm_signal):
	Remove.  No need to deliver this to the parent; any thread can
	handle this signal now.  All uses replaced by underlying handler.
	* atimer.c (turn_on_atimers):
	* dispnew.c (handle_window_change_signal):
	* emacs.c (handle_danger_signal):
	* keyboard.c (kbd_buffer_get_event):
	Don't reestablish signal handler; not needed with sigaction.
	* blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
	(UNBLOCK_INPUT_TO):
	Rework to avoid unnecessary accesses to volatile variables.
	(UNBLOCK_INPUT_TO): Now a function.
	(totally_unblock_input, unblock_input): New decls.
	* data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
	(init_data): Remove.  Necessary stuff now done in init_signal.
	* emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
	* emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
	(fatal_error_code): Remove; no longer needed.
	(terminate_due_to_signal): Rename from fatal_error_backtrace, since
	it doesn't always backtrace.  All uses changed.  No need to reset
	signal to default, since sigaction and/or die does that for us now.
	Use emacs_raise (FOO), not kill (getpid (), FOO).
	(main): Check more-accurately whether we're dumping.
	Move fatal-error setup to sysdep.c
	* floatfns.c: Do not include "syssignal.h"; no longer needed.
	* gtkutil.c (xg_get_file_name, xg_get_font):
	Remove no-longer-needed signal-mask manipulation.
	* keyboard.c, process.c (POLL_FOR_INPUT):
	Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
	* keyboard.c (read_avail_input): Remove.
	All uses replaced by gobble_input.
	(Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
	(kbd_buffer_store_event_hold, gobble_input):
	(record_asynch_buffer_change) [USABLE_SIGIO]:
	(store_user_signal_events):
	No need to mess with signal mask.
	(gobble_input): If blocking input and there are terminals, simply
	set pending_signals to 1 and return.  All hooks changed to not
	worry about whether input is blocked.
	(process_pending_signals): Clear pending_signals before processing
	them, in case a signal comes in while we're processing.
	By convention callers now test pending_signals before calling us.
	(UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
	New functions, to support changes to blockinput.h.
	(handle_input_available_signal): Now extern.
	(reinvoke_input_signal): Remove.  All uses replaced by
	handle_async_input.
	(quit_count): Now volatile, since a signal handler uses it.
Stefan Monnier's avatar
Stefan Monnier committed
1618 1619
	(handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
	All callers changed.  Block SIGINT only if not already blocked.
1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682
	Clear sigmask reliably, even if Fsignal returns, which it can.
	Omit unnecessary accesses to volatile var.
	(quit_throw_to_read_char): No need to restore sigmask.
	* keyboard.c (gobble_input, handle_user_signal):
	* process.c (wait_reading_process_output):
	Call signal-handling code rather than killing ourselves.
	* lisp.h: Include <float.h>, for...
	(IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
	(pending_signals): Now volatile.
	(syms_of_data): Now const if IEEE floating point.
	(handle_input_available_signal) [USABLE_SIGIO]:
	(terminate_due_to_signal, record_child_status_change): New decls.
	* process.c (create_process): Avoid disaster if memory is exhausted
	while we're processing a vfork, by tightening the critical section
	around the vfork.
	(send_process_frame, process_sent_to, handle_pipe_signal)
	(deliver_pipe_signal): Remove.  No longer needed, as Emacs now
	ignores SIGPIPE.
	(send_process): No need for setjmp/longjmp any more, since the
	SIGPIPE stuff is now gone.  Instead, report an error if errno
	is EPIPE.
	(record_child_status_change): Now extern.  PID and W are now args.
	Return void, not bool.  All callers changed.
	* sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
	Remove.  All uses removed.  This bug should be fixed now in a
	different way.
	(wait_for_termination_1): Use waitpid rather than sigsuspend,
	and record the child status change directly.  This avoids the
	need to futz with the signal mask.
	(process_fatal_action): Move here from emacs.c.
	(emacs_sigaction_flags): New function, containing
	much of what used to be in emacs_sigaction_init.
	(emacs_sigaction_init): Use it.  Block nonfatal system signals that are
	caught by emacs, to make races less likely.
	(deliver_process_signal): Rename from handle_on_main_thread.
	All uses changed.
	(BACKTRACE_LIMIT_MAX): Now at top level.
	(thread_backtrace_buffer, threadback_backtrace_pointers):
	New static vars.
	(deliver_thread_signal, deliver_fatal_thread_signal):
	New functions, for more-accurate delivery of thread-specific signals.
	(handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
	(deliver_arith_signal): Handle in this thread, not
	in the main thread, since it's triggered by this thread.
	(maybe_fatal_sig): New function.
	(init_signals): New arg DUMPING so that we can be more accurate
	about whether we're dumping.  Caller changed.
	Treat thread-specific signals differently from process-general signals.
	Block all signals while handling fatal error; that's safer.
	xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
	on IEEE hosts.
	When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
	Ignore SIGPIPE unless batch.
	(emacs_backtrace): Output backtrace for the appropriate thread,
	which is not necessarily the main thread.
	* syssignal.h: Include <stdbool.h>.
	(emacs_raise): New macro.