+2012-12-21 Eli Zaretskii <eliz@gnu.org>
+
+ * fileio.c (Finsert_file_contents): Doc fix.
+
+ * w32proc.c (new_child, delete_child, find_child_pid): For a
+ subprocess, consider its slot being in use as long as its process
+ handle (procinfo.hProcess) is not NULL. This avoids reusing the
+ slot when a new process is started immediately after killing
+ another one, without waiting enough time for the first process to
+ be reaped and resources allocated for it be orderly freed.
+ (Bug#13086)
+ Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
+
+2012-12-21 Chong Yidong <cyd@gnu.org>
+
+ * buffer.c (Fset_buffer_major_mode): Doc fix (Bug#13231).
+
+ * fns.c (Fcompare_strings): Doc fix (Bug#13081).
+
+2012-12-21 Eli Zaretskii <eliz@gnu.org>
+
+ * w32.c (get_name_and_id): Always pass NULL as the first argument
+ of lookup_account_sid. Avoids crashes with UNC file names that
+ refer to DFS domains, not to specific machine names. (Bug#12621)
+ Remove now unused argument FNAME; all callers changed.
+ (get_file_owner_and_group): Remove now unused argument FNAME; all
+ callers changed.
+
+2012-12-21 Chong Yidong <cyd@gnu.org>
+
+ * editfns.c (Finsert_char): Since read-char-by-name now signals an
+ error for invalid chars, don't check for a nil return value.
+
+2012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
+
+ Avoid calls to CHAR_TO_BYTE if byte position is known.
+ * editfns.c (make_buffer_string_both): Use move_gap_both.
+ (Fbuffer_string): Use make_buffer_string_both.
+ * marker.c (buf_charpos_to_bytepos): Convert to eassert.
+ Adjust comment.
+ (buf_bytepos_to_charpos): Likewise.
+ (charpos_to_bytepos): Remove.
+ * fileio.c (Finsert_file_contents): Use move_gap_both.
+ * search.c (Freplace_match): Likewise.
+ * process.c (process_send_region): Likewise. Use convenient
+ names for byte positions.
+ * lisp.h (charpos_to_bytepos): Remove prototype.
+ * indent.c (scan_for_column): Use CHAR_TO_BYTE.
+ * insdel.c (move_gap): Likewise.
+
+2012-12-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xdisp.c (redisplay_internal): Remove now-unused local.
+
+2012-12-20 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * xdisp.c (select_frame_for_redisplay, ensure_selected_frame): Remove.
+ (redisplay_internal): Don't bother selecting the frame to get the
+ proper value of frame-local variables.
+
+2012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * textprop.c (set_text_properties_1): Do not allow NULL interval.
+ Rename 4th argument since it may be buffer or string. Adjust comment.
+ * intervals.c (graft_intervals_info_buffer): Find an interval here.
+
+2012-12-19 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * coding.c (Fdetect_coding_region): Do not check start and end with
+ CHECK_NUMBER_COERCE_MARKER since validate_region does that itself.
+ (code_convert_region): Likewise.
+
+2012-12-18 Eli Zaretskii <eliz@gnu.org>
+
+ * w32.c (acl_get_file, acl_set_file): Run the file name through
+ map_w32_filename, and resolve any symlinks in the file name, like
+ Posix platforms do.
+ (acl_set_file): Call revert_to_self, if any privileges were
+ enabled.
+
+2012-12-17 Juanma Barranquero <lekktu@gmail.com>
+
+ * makefile.w32-in ($(BLD)/editfns.$(O), $(BLD)/fileio.$(O))
+ ($(BLD)/w32.$(O)): Update dependencies.
+
+2012-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * xdisp.c (select_frame_for_redisplay): Use select_window_1 to
+ propagate redisplay's scrolling (if any) to the right window.
+ (redisplay_internal): Use ensure_selected_frame.
+ (display_mode_lines): Complete last fix.
+ * window.c (select_window_1): New func, extracted from select_window.
+ (select_window): Use it.
+ * window.h (select_window_1): Declare.
+
+2012-12-17 Eli Zaretskii <eliz@gnu.org>
+
+ Emulate Posix ACL APIs on MS-Windows.
+ * w32.c: Include sddl.h and sys/acl.h.
+ (SDDL_REVISION_1): Define if not already defined.
+ (g_b_init_get_security_descriptor_dacl)
+ (g_b_init_convert_sd_to_sddl, g_b_init_convert_sddl_to_sd)
+ (g_b_init_is_valid_security_descriptor)
+ (g_b_init_set_file_security): New static flags.
+ (globals_of_w32): Initialize them to zero.
+ (SetFileSecurity_Name): New string constant.
+ (SetFileSecurity_Proc, GetSecurityDescriptorDacl_Proc)
+ (ConvertStringSecurityDescriptorToSecurityDescriptor_Proc)
+ (ConvertSecurityDescriptorToStringSecurityDescriptor_Proc)
+ (IsValidSecurityDescriptor_Proc): New typedefs.
+ (get_file_security, get_security_descriptor_owner)
+ (get_security_descriptor_group): Set errno to ENOTSUP.
+ (set_file_security, get_security_descriptor_dacl)
+ (is_valid_security_descriptor, convert_sd_to_sddl)
+ (convert_sddl_to_sd, acl_valid, acl_to_text, acl_from_text)
+ (acl_free, acl_get_file, acl_set_file): New functions.
+
+ * fileio.c (Fcopy_file) [WINDOWSNT]: Support copying ACLs.
+
+2012-12-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ Don't reraise SIGCHLD, as that can now lose (Bug#13192).
+ With the 2012-12-03 fix for Bug#12980 in place, an old workaround
+ for some of that bug's symptoms can now cause Emacs to abort.
+ Remove the workaround.
+ * process.c (wait_reading_process_output): Don't reraise SIGCHLD.
+ The bug that caused SIGCHLD to get lost has been fixed, and the
+ workaround for it can now cause Emacs to abort.
+
+2012-12-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * sysdep.c (emacs_abort): Bump backtrace size to 40.
+ Companion to the 2012-09-30 patch. Suggested by Eli Zaretskii in
+ <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
+
+2012-12-16 Romain Francoise <romain@orebokech.com>
+
+ * fileio.c (Ffile_acl, Fset_file_acl): New functions.
+ (Fcopy_file): Change last arg to `preserve_extended_attributes'
+ and copy ACL entries of file in addition to SELinux context if set.
+ (syms_of_fileio): Add `file-acl' and `set-file-acl'.
+
+ * Makefile.in (LIBACL_LIBS): New macro.
+ (LIBES): Use it.
+
+2012-12-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fileio.c (internal_delete_file): Use bool for boolean.
+
+2012-12-15 Eli Zaretskii <eliz@gnu.org>
+
+ Fix bug #13079 on MS-Windows with temp files not being deleted.
+ * w32.h (_child_process): New members input_file and
+ pending_deletion.
+ (register_child): First argument is now pid_t.
+ (record_infile, record_pending_deletion): New prototypes.
+
+ * w32proc.c (new_child): Initialize input_file and
+ pending_deletion members of the child.
+ (delete_child): Delete the child's temporary input file, if any,
+ that is pending deletion.
+ (register_child): First argument is now pid_t.
+ (record_infile, record_pending_deletion): New functions.
+ (reap_subprocess): Fix a typo in DebPrint string.
+ (sys_spawnve, sys_kill): Use pid_t for PID arguments.
+
+ * fileio.c (internal_delete_file): Return an int again: non-zero
+ if delete-file succeeds, zero otherwise.
+
+ * lisp.h (internal_delete_file): Adjust prototype.
+
+ * callproc.c (Fcall_process): Don't overwrite infile with result
+ of DECODE_FILE.
+ [WINDOWSNT] If BUFFER is an integer, i.e. we are launching an
+ asynchronous subprocess, record the name of the input file name,
+ if any.
+ (delete_temp_file) [WINDOWSNT]: If internal_delete_file fails to
+ delete the file, record it as pending deletion when the subprocess
+ exits.
+
+2012-12-14 Eli Zaretskii <eliz@gnu.org>
+
+ * editfns.c [HAVE_PWD_H]: Include grp.h.
+
+ * makefile.w32-in ($(BLD)/editfns.$(O)): Add $(NT_INC)/grp.h.
+
+2012-12-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix permissions bugs with setgid directories etc. (Bug#13125)
+ * dired.c (Ffile_attributes): Return t as the 9th attribute,
+ to mark it as a placeholder. The old value was often wrong.
+ The only user of this attribute has been changed to use
+ file-ownership-preserved-p instead, with its new group arg.
+ * editfns.c (Fgroup_gid, Fgroup_real_gid): New functions.
+
+2012-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * xdisp.c (select_frame_for_redisplay, display_mode_lines):
+ Keep selected_window and selected_frame in sync.
+
+2012-12-14 Eli Zaretskii <eliz@gnu.org>
+
+ * w32.c (stat_worker): If w32_stat_get_owner_group is zero, do not
+ try to get accurate owner and group information from NT file
+ security APIs. This is to make most callers of 'stat' and
+ 'lstat', which don't need that information, much faster.
+
+ * dired.c (Ffile_attributes) [WINDOWSNT]:
+ Set w32_stat_get_owner_group to a non-zero value, to request accurate
+ owner and group information from 'lstat'.
+