* emacs.c (close_output_streams): Don't clear and restore errno.
src/ChangeLog: Add header line to recent MSDOS-related entries.
Fix bug #17288 with inserting left truncation glyph under linum-mode.

 src/xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
 glyph is written to TEXT_AREA of the temporary glyph_row.
Avoid recursive load of tramp.el

* net/tramp.el (tramp-run-real-handler, tramp-file-name-handler):
Do not autoload.
(tramp-file-name-handler, tramp-completion-file-name-handler):
Revert patch from 2014-04-10, it isn't necessary anymore.
(tramp-autoload-file-name-handler)
(tramp-register-autoload-file-name-handlers): New defuns.
(top): Autoload call of `tramp-register-autoload-file-name-handlers'.
(tramp-register-file-name-handlers): Remove also
`tramp-autoload-file-name-handler' from `file-name-handler-list'.
Do not autoload its invocation, but eval it after loading of 'tramp.

* net/tramp-adb.el (tramp-unload-hook): Unload `tramp-adb'.

* net/tramp-compat.el (tramp-unload-hook): Unload `tramp-loaddefs'.
* automated/tramp-tests.el (tramp-copy-size-limit): Set to nil.
(tramp--test-make-temp-name): Optional argument LOCAL.
(tramp--instrument-test-case): Show messages.  Catch also `quit'.
(tramp-test10-write-region): No special test for out-of-band copy
needed anymore.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test21-file-links): Extend tests.
(tramp-test20-file-modes): More robust check for user "root".
(tramp--test-check-files): New defun.
(tramp-test30-special-characters, tramp-test33-recursive-load)
(tramp-test34-unload): New tests.
(tramp-test31-utf8, tramp-test32-asynchronous-requests):  Rename.
* automated/tramp-tests.el (tramp--test-check-files): Extend test.
(tramp-test31-utf8): Let-bind also `file-name-coding-system'.
* lisp/progmodes/sh-script.el (sh-smie--sh-keyword-p): Handle variable
assignments such as "case=hello".
* src/intervals.c (rotate_right, rotate_left): Fix up length computation.
Also change identifiers to match the comments, and add more assertions.
Instrument `tramp--test-check-files' in order to get traces on hydra.
Fix commit date of an entry in lisp/ChangeLog.16.
Improve NEWS entry for dired-hide-details-mode.
* net/tramp-sh.el (tramp-get-ls-command): Use "-b" argument if possible.
* automated/tramp-tests.el (tramp-test19-directory-files-and-attributes)
(tramp-test22-file-times): Check for `file-attributes' equality
only if there is a usable timestamp.
(tramp--test-check-files): Do not use `copy-sequence'.
Spelling fixes.
Fix redefinition warning in MinGW64 build.

 nt/inc/ms-w32.h (lseek): Define only if not already a macro.
 Suggested by Fabrice Popineau <fabrice.popineau@gmail.com>.
Mention that overlay priority doesn't have to be nil or an integer.
doc/emacs/ChangeLog: Typo fix.
Minor fixes to the docs.

 doc/emacs/buffers.texi (Uniquify): Clarify the default uniquification.
 doc/emacs/indent.texi (Tab Stops): Improve wording.
 doc/emacs/cmdargs.texi (General Variables): Improve docs of
 EMACSLOADPATH.  Index all the environment variables.
 (Misc Variables): Index all the environment variables.

 doc/lispref/text.texi (Registers): Document register-read-with-preview.
 doc/lispref/internals.texi (Building Emacs): Improve indexing.
Fix freezing with scroll bars of GTK3 Toolkit.
* src/keyboard.c (unblock_input): Add comment.
* src/xgselect.c (xg_select): Prevent Glib main loop recursion.
* lisp/progmodes/prog-mode.el (prettify-symbols--compose-symbol):
Don't prettify a word within a symbol.