Ugly fix for bug#11556.

* desktop.el (desktop-read): Clear previous and next buffers for all
windows and bury *Messages* buffer (bug#11556).
Fix subtle problem with redirection in nt/configure.bat.

 nt/configure.bat (genmakefiles): Move the redirection away from the
 end of the command, to avoid excess whitespace at the end of Make
 variables created at configure time, and also avoid things like
 "FOO1>>config.settings", where "1" gets interpreted as the file
 descriptor and eaten up.  This fixes breakage introduced by the
 last change, without reintroducing the bug fixed by that change.
Avoid buffer text relocations in calls to STRING_CHAR_* macros.

 src/charset.c (maybe_unify_char): Inhibit relocation of buffer text
 for the duration of call to load_charset, to avoid problems with
 callers of maybe_unify_char that access buffer text through C
 pointers.
 src/ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
 decrement the inhibition flag, instead of just setting or
 resetting it.
Don't call r_alloc_inhibit_buffer_relocation from search.c.

 src/search.c (search_buffer): Remove calls to
 r_alloc_inhibit_buffer_relocation, as it is now called by
 maybe_unify_char, which was the cause of relocation of buffer text
 in bug#11519.
Fix bug #11405 with MSVC build of emacsclientw.

 lib-src/makefile.w32-in ($(BLD)/emacsclientw.exe): Use $(MWINDOWS)
 instead of a literal -mwindows, which is not supported by MSVC.
 nt/nmake.defs (MWINDOWS): Define as "-subsystem:windows -entry:mainCRTStartup".
 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
 nt/gmake.defs (MWINDOWS): Define as "-mwindows".
* keymap.c (describe_map_tree): Revert 2011-07-07 change.

* doc.c (Fsubstitute_command_keys): Doc fix.
Improve call-process-region error message.

* src/callproc.c (Fcall_process_region): Include directory component
in mkstemp error message.
ispell.el: Define `ispell-with-no-warnings' as a macro. Deal with obsolete `interactive-p'

* Current `ispell-with-no-warnings' definition does not avoid warnings.
  Use a macro definition taken from orgmode.

* Deal with a couple of occurrences of obsolete `interactive-p'.
Fix bug #11587 with a crash in an Info buffer under linum-mode.

 src/xdisp.c (handle_stop): Detect whether we have overlay strings
 loaded by testing it->current.overlay_string_index to be
 non-negative, instead of checking whether n_overlay_strings is
 positive.
Clean up __executable_start, monstartup when --enable-profiling.

The following changes affect the code only when profiling.
* dispnew.c (__executable_start): Rename from safe_bcopy.
Define only on platforms that need it.
* emacs.c: Include <sys/gmon.h> when profiling.
(_mcleanup): Remove decl, since <sys/gmon.h> does it now.
(__executable_start): Remove decl, since lisp.h does it now.
(safe_bcopy): Remove decl; no longer has that name.
(main): Coalesce #if into single bit of code, for simplicity.
Cast pointers to uintptr_t, since standard libraries want integers
and not pointers.
* lisp.h (__executable_start): New decl.
* etc/NEWS: Doc fix.
Add `declare' for `defun'.  Align `defmacro's with it.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode)
(define-globalized-minor-mode): Don't autoload the var definitions.
* lisp/emacs-lisp/byte-run.el: Use lexical-binding.
(defun-declarations-alist, macro-declarations-alist): New vars.
(defmacro, defun): Use them.
(make-obsolete, define-obsolete-function-alias)
(make-obsolete-variable, define-obsolete-variable-alias):
Use `declare'.
(macro-declaration-function): Mark obsolete.
* lisp/emacs-lisp/autoload.el: Use lexical-binding.
(make-autoload): Add `expansion' arg.  Rely more on macro expansion.
Remove obsolete '#define static' cruft.

* etc/PROBLEMS: Remove obsolete '#define static' cruft.
* lwlib/xlwmenu.c [emacs]: Include "bitmaps/gray.xbm".
(gray_bitmap_width, gray_bitmap_height, gray_bitmap_bits) [!emacs]:
Remove; all uses replaced with definiens.
* src/s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
This #undef was "temporary" in 2000; it is no longer needed
now that '#define static' has gone away.
* src/xfns.c, src/xterm.h (gray_bitmap_width, gray_bitmap_height)
(gray_bitmap_bits): Remove; no longer needed.
All uses replaced with definiens.
* src/xterm.c: Include "bitmaps/gray.xbm".
Fix long filename handling of byte-compile-fix-header.

* lisp/emacs-lisp/bytecomp.el (byte-compile-fix-header): Handle
arbitrary file name lengths (Bug#11585).
Merge from emacs-24; up to r108025
Merge from emacs-24; up to r108025
Pacify gcc -Wdouble-precision when using Xaw.

* xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
[HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
Use 'float' consistently, rather than 'float' in most places
and 'double' in a couple of places.
Add option imagemagick-types-enable

* lisp/image.el: For clarity, call imagemagick-register-types at
top-level, rather than relying on a custom :initialize.
(imagemagick-types-enable): New option. 
(imagemagick-register-types): Respect imagemagick-types-inhibit.
If disabling support, remove elements altogether rather
than using an impossible regexp.
(imagemagick-types-inhibit): Give it the default init function.

* src/image.c (Fimagemagick_types): Doc fix.

* etc/NEWS: Mention this.