Fix bug #17269 with corruption of the newline cache.

 src/insdel.c (invalidate_buffer_caches): Invalidate the bidi
 paragraph-start cache before the newline cache.
Fix bug #17281 with infloop in line-pixel-height.

 src/xdisp.c (Fline_pixel_height): Don't assume that the current
 buffer and the selected window's buffer are one and the same.
Prevent endless loop in x_make_frame_visible.

* xterm.c (x_make_frame_visible): Prevent endless loop when frame
never becomes visible, i.e. using XMonad .
* notes/bzr: Update instructions for merging from gnulib.

Remove obsolete note about tramp.el and tramp-sh.el.
Change "emacs-23" to "emacs-24".
* 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.
Merge from emacs-24; up to r116982
* 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".
Link to glib-using libraries when checking for glib.

* configure.ac (XGSELOBJ): Include GTK_LIBS, RSVG_LIBS, etc.
when testing whether Glib is linked in.  Similarly for CFLAGS.
* src/intervals.c (rotate_right, rotate_left): Fix up length computation.
Also change identifiers to match the comments, and add more assertions.
Merge from emacs-24; up to r116985
Instrument `tramp--test-check-files' in order to get traces on hydra.
* configure.ac: Add comment explaining why HAVE_GLIB is different.
defstruct introspection
Tweak documentation for previous change
cl-lib defstruct introspection