Fix bug #11958 with description of mouse-2 in the Emacs manual.

 doc/emacs/frames.texi (Mouse Commands): Fix the description of mouse-2.
Backport fix for Bug#11989 from trunk.

* mouse.el (mouse-drag-track): Do not set the mark if the user
releases the mouse without selecting anything.
In pp-display-expression select old selected window only if it is still live (Bug#12034).

* emacs-lisp/pp.el (pp-display-expression): Select old selected
window only if it is still live (Bug#12034).
Fixes: debbugs:12042

* faces.el (face-spec-reset-face): Fix last change.
Avoid leaving nil in the alist in cc-imenu-objc-function
* nsterm.m (ns_read_socket): Return early if there is a modal window.
gnus-art.el (gnus-kill-sticky-article-buffers): Reintroduce
Use typedef for EMACS_INT, EMACS_UINT.

* lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
than macros.  This simplifies debugging in the usual case, since
it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
and it allows expressions involving EMACS_INT casts.
* .gdbinit (xreload): Simplify by using EMACS_INT cast.
* international/mule-cmds.el (ucs-insert): Mark it as an obsolete
  function, not an obsolete variable (Bug#12046).
Autoload more carefully from Lisp.  Follow aliases for function properties.
* lisp/subr.el (autoloadp): New function.
(symbol-file): Use it.
(function-get): New function.
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Use function-get and
autoload-do-load.
* lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-syntactic-face-function)
(lisp-indent-function):
* lisp/emacs-lisp/gv.el (gv-get):
* lisp/emacs-lisp/edebug.el (get-edebug-spec, edebug-basic-spec):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form):
* lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
* lisp/emacs-lisp/autoload.el (make-autoload, autoload-print-form):
Use function-get.
* lisp/emacs-lisp/cl.el: Don't propagate function properties any more.

* src/eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
add argument, tune behavior, and adjust all callers.

* lisp/speedbar.el (speedbar-add-localized-speedbar-support):
* lisp/emacs-lisp/disass.el (disassemble-internal):
* lisp/desktop.el (desktop-load-file):
* lisp/help-fns.el (help-function-arglist, find-lisp-object-file-name)
(describe-function-1):
* lisp/emacs-lisp/find-func.el (find-function-noselect):
* lisp/emacs-lisp/elp.el (elp-instrument-function):
* lisp/emacs-lisp/advice.el (ad-has-proper-definition):
* lisp/apropos.el (apropos-safe-documentation, apropos-macrop):
* lisp/emacs-lisp/debug.el (debug-on-entry):
* lisp/emacs-lisp/cl-macs.el (cl-compiler-macroexpand):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
* lisp/calc/calc.el (name): Use autoloadp & autoload-do-load.
* lisp/mouse.el (popup-menu): Fix last change.
Explicitly free restriction data that are not needed anymore.
* editfns.c (save_restriction_restore): Free restriction data.
Simplify export of symbols to GDB; fix related .gdbinit bugs.

* etc/emacs-buffer.gdb ($tagmask, $valmask): Remove.
(ygetptr): Adjust to recent changes in lisp.h and emacs.c,
by using VALMASK instead of $valmask, CHECK_LISP_OBJECT_TYPE
instead of gdb_use_union, and DATA_SEG_BITS instead of
gdb_data_seg_bits.  Also, use $ptr.i rather than $ptr.u.val.
* src/.gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
$bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
(xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
Adjust to changes in lisp.h and emacs.c, by using
CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
instead of gdb_valbits.
(xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
instead of gdb_array_mark_flag.
(xboolvector): Get size from $->size, not $->header.size.
Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
(xreload, hook-run, hookpost-run): Remove.
* src/emacs.c: Include <verify.h>.
(gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
(gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
Remove.
(gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
(gdb_USE_LSB_TAG): New enum constants.
(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
Also define these as enum constants, so they're visible to GDB.
(ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
(ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
as constants, so they're visible to GDB.
* src/lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
(PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
Now enum constants, not macros, so they're visible to GDB.
(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
more convenient now.  All uses changed.
(VALMASK) [USE_LSB_TAG]: Also define in this case.
* src/mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
In mouse-drag-line don't exit tracking prematurely (Bug#12006).

* mouse.el (popup-menu): Fix doc-string and re-indent code.
(mouse-drag-line): Don't exit tracking when a switch-frame or
switch-window event occurs (Bug#12006).
Spelling fix in comment.
Add Bug#12036 to latest ChangeLog entry.

(I found this bug report after installing the change.)
src/makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
Fix parallel bootstrap in lisp/ on MS-Windows.

 lisp/makefile.w32-in ($(lisp)/calendar/cal-loaddefs.el)
 ($(lisp)/calendar/diary-loaddefs.el)
 ($(lisp)/calendar/hol-loaddefs.el, $(lisp)/mh-e/mh-loaddefs.el)
 ($(lisp)/net/tramp-loaddefs.el): Depend on update-subdirs.  Fixes
 failures in parallel bootstrap because subdirs.el is being
 rewritten while the autoload files are built at the same time,
 which needs to load subdirs.el.
Fix export of symbols to GDB.

* alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
(ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
emacs.c, as this is a more-suitable home.  Had this been done earlier
the fix for 12036 would have avoided some of the problems noted in
<http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
would have been more obvious.
* emacs.c (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
(gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
Remove; now done in lisp.h.
* lisp.h (PUBLISH_TO_GDB): New macro.
(GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
(DATA_SEG_BITS): Use it.
(GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
(CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
* mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
not be usable in #if.  This simplifies things.
* emacs.c: Do not include <verify.h>; no longer needed.