magit-filename: new face
remove unused magit-diff-section-for-diffstat
rename magit-diff-{highlight => paint}-whitespace
rename magit-{section-diff => diff-file}-header
rename magit-{section-region-siblings => region-sections}
replace magit-current-sections with magit-region-values

Add function `magit-region-values' replacing `magit-current-sections'.
Both functions take an optional TYPES argument and return nil if the
sections in the region don't match.  But while the old function returned
a list of section objects the new function returns a list of section
values.  And while the old function did fallback to a list consisting
only of the current section if the region only spanned one section or
wasn't in use, the new function simply returns nil.

Use `magit-region-values' in places where `magit-current-sections' or
`(magit-region-sections 'magit-section-value)' was previously used.
Drop `magit-region-sections' now unused KEY argument.
replace magit-current-section with magit-section-highlighted-sections

Replace the variable `magit-current-section' whose value was a single
section with `magit-section-highlighted-sections' whose value is a list
of sections.

Currently all sections are still highlighted using overlays and because
these overlays are stored in existing `magit-section-highlight-overlays',
we don't actually have to store all highlighted sections in the new
variable yet.

This commit makes it possible to use text-properties instead of overlays
to highlight diff sections, but that follows in a later commit.
make the current section part of the section selection

Until now only sections that had at least one character inside the
region were part of the section selection, and so the current section
usually wasn't part of the selection.

Commands that only know how to act on a single section simply ignore
the selection and instead act on the current section.  When the current
section wasn't considered part of the selection yet this was problematic
because users don't necessarily know which commands use the selection,
so they might select A and B, while point is on C and invoke a command
with the intention to do something with A and B but instead end up
having something done to C.  Now they would expect something to happen
with A and B, and it would only happen to B, which is much less
problematic.
magit-section-make-overlay: return the overlay
magit-face-remap-set-base: new function

We cannot use `face-remap-set-base' because it is broken at least in
24.3; first it turns the input into an atom and then it tries to get
the car of that.

This isn't just a copy of that function; our implementation is simpler
but doesn't attempt to deal with any possible input we won't be using,
then again it does not barf on any input.
magit-diff-hunk-region-{patch,header}: new function

Create `magit-diff-hunk-region-patch' from all code previously
in `magit-apply-region' except the "apply" part.

Add `magit-diff-hunk-region-header' which used the other new
function and returns just the header.
magit-diff-wash-{diff,hunk}: cosmetics
magit-diff.el: split into more sections
magit-diff.el: move definitions

This prepares for upcoming changes.
magit-diff-scope: add optional STRICT argument

Certain sections (diffstats and untracked files) are treated like diffs
but actually are not (they have no hunks).  In some cases we want to
treat them differently, the STRICT argument causes `magit-diff-scope'
to return nil for such sections.
prefix diff faces with "magit-diff-"

There also exist a few faces prefixed with "magit-diffstat-".
improve appearance of sibling selections and hunk regions

The region can be used to select either several sibling sections or a
range of lines within a single hunk section.

When several sections are selected they are now all displayed the same
way each one of them would be displayed if it were the current section.
If the selected sections are diff file or hunk sections then their
headings are additionally displayed in a different face to make it more
obvious that multiple sections are selected.

When the region spans lines within a hunk then only these lines are
propertized using the usual distinct faces for added and remove lines
lines.  Lines inside the hunk but outside the region are propertized
using the context face, that includes lines beginning with "+" and "-".

Highlighting of the current section now works like this.  The section
is highlighted using an overlay with covers all of the section.  If
multiple sections are selected each one of them is highlighted using
a separate overlay.  Each highlighting overlay has to be added to
`magit-section-highlight-overlays'.  After each command all of these
overlays are deleted and new ones created as needed, which isn't as
wasteful as it may sound.

Highlighted hunk sections and sections that contain such sections
also use an overlay but it only covers the heading.  Hunk bodies are
propertized using text properties.  Each section which uses properties
for highlighting has to be added to `magit-section-highlighted-sections'.
These text properties are not discarded after every command; properties
are only changed for those sections which are newly or no longer
highlighted.
magit-read-range-or-commit: replace alias with actual definition

Previously this was just an alias for `magit-read-branch-or-commit',
now it provides additional functionality useful when reading a range;
the commit at the end and beginning of the region are used as "E..B".
Merge branch 'n/regions' into next