Fix bug #18339 with segfault when $ is typed into empty LaTeX buffer.
Back-ported from trunk revision-id: eliz@gnu.org-20140827194054-k7hd0vvmleql9wos

 src/syntax.c (scan_lists): Don't examine positions before BEGV.
* lisp/tar-mode.el (tar--extract, tar-extract): Avoid disabling undo
in extracted buffers.
* lisp/startup.el (fancy-splash-frame): Extend the fix for Bug#16014 to the Cygwin-w32 build.  (Bug#18347)
Minor ChangeLog fix.
* src/conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define.  (Bug#18366)
Fix cursor display on the fringe of R2L screen lines.

 src/xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
 when HPOS is negative, for the benefit of R2L glyph rows whose
 newline overflows into the fringe.
* lisp/tutorial.el (tutorial--display-changes): Fix 2014-07-29 change.
* lisp/progmodes/python.el (python-indent-post-self-insert-function):
Avoid electric colon at beginning-of-defun. 

* test/automated/python-tests.el:
(python-indent-electric-colon-1): New test.  (Bug#18228)
* eval.c (internal_lisp_condition_case): Don't overrun the stack

when configured --with-wide-int on typical 32-bit platforms.
* lisp/tutorial.el: Restore comment lost 2006-12-21.
Fix bug #18384 with incorrect reporting of row number by posn-col-row.

 lisp/subr.el (posn-col-row): Revert the change from commit
 r99634.2.576 eliz@gnu.org-20101113210758-8ml5kibjtza5ysmb, which
 was inadvertently merged from emacs-23 release branch in r102428
 monnier@iro.umontreal.ca-20101118035414-yvlg7k7dk4k4l3q, and
 introduced an off-by-one error in the reported row when there is a
 header line.

 src/dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
 the reported row in the case of a window with a header line, by
 improving on the fix committed in r106022
 eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc.
* lisp/progmodes/gud.el (gud-gdb-completion-at-point): Add hack.
(gud-gdb-completions): Remove obsolete workaround.
* lisp/emacs-lisp/package.el (package-generate-description-file):
Properly quote the arguments.  Change second arg.
(package--alist-to-plist-args): Rename from package--alist-to-plist and
quote the elements.
(package--make-autoloads-and-stuff): Fix the test for pre-existence of
the *-pkg.el file.  Adjust to new calling convention of
package-generate-description-file.
test/indent/scheme.scm: New file.
* lisp/progmodes/sh-script.el (sh-font-lock-quoted-subshell): Try to better
handle multiline elements.
Merge from emacs-24; up to r117476
Clean up initialization and customization of horizontal scroll bars.

* frame.el (frame-initialize): Remove horizontal-scroll-bars
from frame-initial-frame-alist.
* scroll-bar.el (previous-horizontal-scroll-bar-mode)
(horizontal-scroll-bar-mode-explicit)
(set-horizontal-scroll-bar-mode, get-horizontal-scroll-bar-mode)
(toggle-horizontal-scroll-bar): Remove.
(horizontal-scroll-bar-mode): Remove defcustom.
(horizontal-scroll-bar-mode): Fix doc-string.
(scroll-bar-toolkit-scroll)
(scroll-bar-toolkit-horizontal-scroll): Add doc-strings stubs.
* buffer.c (scroll-bar-height): Fix typo in doc-string.
* frame.c (Vdefault_frame_horizontal_scroll_bars): Remove
variable.
* nsfns.m (Fx_create_frame):
* w32fns.c (Fx_create_frame):
* xfns.c (Fx_create_frame): Default horizontal scroll bars to
nil.
NEWS and TODO changes.
Ignore files and fix indentation of else static if in d-mode
Emacs compiles after porting changes from http://cx4a.org/repo/emacs.bzr/regexp