  Based on over 3000 BV images of M4 collected in years 1995-2009 we obtain
light curves of 22 variables, 10 of which are newly detected objects. We
identify four detached eclipsing binaries and eight contact binaries. Accurate
periods are found for all but two variables. Nineteen variables are
proper-motion members of the cluster, and the remaining three are field stars.
Five variables are optical counterparts of X-ray sources. For one of the
variables unassociated with X-ray sources we report a flare lasting for about
90 min and reaching an amplitude of 0.11 mag in V. One of the new contact
binaries has a record-low mass ratio q=0.06. Another four such systems show
season-to season luminosity variations probably related to magnetic activity
cycles, whose lengths are surprisingly similar to that of the solar cycle
despite a huge difference in rotational periods. The location of contact
binaries on the color-magnitude diagram of M4 strongly suggests that at least
in globular clusters the principal factor enabling EW systems to form from
close but detached binaries is stellar evolution. We identify 46 blue and
yellow stragglers in M4 and discuss their properties. We also derive a map of
the differential extinction in the central part of M4, and determine the
reddening of a selected reference region, E(B-V)= 0.392 mag.
