Subject: 24.3.94; set-fringe-mode with left fringe 0 breaks window width calculations on Mac OS

From: Constantine Vetoshev <[email-masked]>
Date: Thu, 2 Oct 2014 01:38:46 -0700

The Emacs pretest released earlier today has a window width
calculation bug on Mac OS X when the window left fringe is turned off.
This bug is not present in the previous Emacs pretest, version
24.3.93.

The outward symptoms of this bug are similar to those #16470, fixed in
January of this year. To reproduce, do the following:

1. Start Emacs 24.3.94 (with -Q to avoid loading initialization files).
2. Execute this Elisp: (set-fringe-mode '(0 . 2))
3. Execute M-x ansi-term and select /bin/zsh as your shell.
4. Run 'ls' or any other command in the shell. Notice the spurious %
characters printed everywhere. This is the bug.

Setting the fringe to '(1 . 2) makes the problem go away.

I'm wondering if this commit is related to this bug?
http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-24&id=984a7aaadb9c10a60621b729a86d6b13a471b92b

In GNU Emacs 24.3.94.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
 of 2014-10-01 on athena.local
Windowing system distributor `Apple', version 10.3.1265
Configured using:
 `configure --with-ns'

Important settings:
  value of $LC_COLLATE: C
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Term

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t