doc/emacs small markup fixes

* doc/emacs/misc.texi (Sorting):
* doc/emacs/search.texi (Query Replace): Markup fixes.
* lisp/startup.el (command-line): Handle altered user-emacs-directory
in load-path warning.
Merge package-x-test.el into package-test.el, to avoid running tests twice

* test/automated/package-x-test.el: Remove file...
* test/automated/package-test.el: ... merge package-x-test.el.
* admin/authors.el (authors-renamed-files-alist): Add package-x-test.el
* apropos.el (apropos-symbols-internal): Avoid error with non-symbol properties.
* lisp/net/ntlm.el (ntlm-build-auth-request): Add NTLM2 Session support.
Add NEWS entry form ntlm.el change
lisp/gnus/gnus-delay.el (gnus-delay-send-queue): Remove `gnus-delay-header' last so it can be used in `message-send-hook'
lisp/gnus/nnimap.el (nnimap-process-expiry-targets): Reverse the list of expired messages only when it was built in reverse order
* imenu.el (imenu-default-goto-function): Fix typo.
coding.c (detect_coding_iso_2022): Set coding->rejected correctly when an invalid escape sequence is found (Bug#18610).
coding.c (detect_coding_iso_2022): Set coding->rejected correctly when an invalid escape sequence is found (Bug#18610).
coding.c (detect_coding_iso_2022): Fix previous change.
coding.c (detect_coding_iso_2022): Fix previous change.
Import from macoport 24.3.94.

* macfont.m: Fix indentation and import changes from macport
24.3.94.
(macfont_closest_traits_index): New function.
(macfont_closest_traits_index_p): Renamed from
macfont_closest_traits_index.
(macfont_list): Use macfont_closest_traits_index_p.
Add ns-use-fullscreen-animation for non-native fullscreen on NS.

* nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new.
(toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
* NEWS: Mention ns-use-fullscreen-animation.
* nsterm.m (ns_select, ns_read_socket): Use unwind_protect to decrease
apploopnr.
* nsterm.m (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
line height (Bug#17977).
Merge from emacs-24; up to r117555