Fix `evil-mode-check-buffers' advice

Some modes, such as magit-key-mode, may kill all local variables
in a newly created buffer before setting `major-mode'. Therefore,
`evil-mode-check-buffers' cannot assume that evil-local-mode will
be properly initialized; it might be necessary to initialize
everything from scratch.
Fix initialization advice for minibuffers.

Evil should never be active in minibuffers. The advice
`evil-mode-check-buffers' (re)initializes evil in certain buffers, but
incorrectly activated evil in the minibuffer.

This fixes #219.
This fixes #220.
Fix deleted buffer bug in `evil-ex-call-command'.

An ex command may delete the buffer in which it has been executed. In
this case no cleanup work must be done (e.g. calling
`deactivate-mark') in this buffer.
Add \r \n \t and \b to magic chars for patterns and replacements

They are transformed to their usual meaning in strings.
This fixes #223.
Make `evil-ex-range' return an expanded range.

The range returned by this function is always an expanded line range.
Set region to ex-range only with explicit range

If no explicit range is specified for an ex command, the command
itself is responsible for determining its working range. Usual evil
operators do this by the :motion property.

But if an explicit range is specified, then the region is modified to
match the region. This allows call use usual Emacs commands, which
work on the region, as ex commands. This is particularly useful if the
ex region is the visual region '<,'>.

This fixes issue #221.
Implement `evil-track-last-insert' using an `after-change-functions' hook.

The previous implementation inspected the undo-list. This may be
problematic with certain packages (e.g. undo-tree) or if no undoing is
available in the buffer. The new version uses an
after-change-functions hook instead. This is more appropriate for this
particular task (the insertion/deletion information is available at
hand) and also has a simpler implementation.
Merge fix of deleted buffer bug in ex
Fix usage of `evil-ex-range' in substitution code.

The ex-range can be an arbitrary range. The using code must not make
any assumption on the type of the range or its expansion state.
Suppress error in ex regexp-address functions.

Regular expression addresses are determined by `evil-ex-re-fwd'
respectively `evil-ex-re-bwd'. Those functions should never raise an
error but return nil if something goes wrong (invalid-pattern, no
match found, ...).

--HG--
extra : amend_source : 598c4424fc72be2618558125acee9ee4b85d6814
Add .nosearch to lib/

The code used to determine the features provided by each package
mirrored on Emacsmirror recursively looks for libraries. The lib/
directory is not part of Evil itself.
Fix `evil-get-magic' for character [

The opening bracket [ is also a magic character but has was missing in
the regular expressions. This caused a wrong transformation if regular
expressions if vim-style regexp are enabled.
Remove `evil-word'.

The correct regexp for word characters is simply "[[:word:]]".
Make double-click mouse selection configurable.

The double-click mouse selection starts a special visual state that
selects words. The customization variable `evil-mouse-word' can be
used to specify the movement function to be used for the word
selection.

This addresses #226.
Make gq move point to last modified line.

gq now calls `evil-fill-and-move' which moves point to the first
non-blank character of the last modified line. In contrast, qw calls
`evil-fill' (formerly bound to gq) which does *not* move point when
filling.

This fixes #230.
Prefix and register command to not stop `evil-execute-in-normal-state'.

Prefix argument and register-read commands belong to the next commands
and should not stop normal-state execution.

This fixes #231.

--HG--
extra : rebase_source : 2ea08c5a0c29a1d57d7630fc01636c93f0cbdc2d
Make `evil-delete-backward-word' compatible with Vim's C-w in insert state

`evil-delete-backward-word' had been implemented as "db". But this is
different from C-w if point is placed at the beginning of a line. In
this case C-w should only delete the preceding newline. This patch
reimplements `evil-delete-backward-word' as a command (instead of an
operator), which handles this special case correctly.

--HG--
extra : rebase_source : 115d4e9be9da275d76756dbe59a23b79a420dbae
Improve mode-line handling

The mode line tag of evil can now be customised to arbitrary positions
within `mode-line-format'. The variable `evil-mode-line-format' can be
used to specify this position, the default remains unchanged. The
implementation of `evil-refresh-mode-line' is now more robust and does
not use `global-mode-string' anymore.

This fixes #228.
Handle case if mode-line position not found

If the mode-line position could not be found, then evil's mode-line
tag should not be added to the mode-line.

This addresses #228.
This fixes #234.
Raise error on `evil-ex-find-next' if no pattern available