Change oak::mutex_t → std::mutex (C++11)
Remove oak::lock_t and oak::mutex_t
Remove Find in Selection menu item

This item had no key equivalent and the find dialog automatically uses “selection” if the current document has a multi-line selection, so I don’t see any need for this menu item.

Also removed the key equivalent for “Find in Folder…” — the key equivalent wasn’t memorable and I don’t see a big need for this item, since one can initiate searches from the file browser.
Update Find window API
Change criterion for focusing find string when dialog is open

We now move focus to the find string unless the window is visible, key, and focus is already in a text field (technically an NSTextView).
Keep title and enabled state of Replace All button updated
Avoid delayed window resize
Set window’s defaultButtonCell

This is instead of setting the key equivalent to ‘\r’ for the button that should be default.
Improve layout constraints for labels

The widest should now be exactly 20 pixels from the window’s left border, and the others are right-aligned with this label.
Gather UI construction code and harmonize fonts
Refactor code
Let TM_MATE point to ‘mate’

This command is used by a lot of commands, so it makes sense to have a dedicated variable for its location.
Use per-line indent patterns when estimating indent

This solves the problem where we need to estimate the current line’s indent, but the lines above it is a multi-line block comment. Previously we would fetch indent patterns based on the current scope, then find the first line above caret, for which the patterns can be used to estimate the indent. The problem is that the commented lines without comment markers would be treated as code, and used for the indent.

With the new approach, we can set different patterns for ‘comment.block’ (the C bundle already does this), which basically ignore all the lines, which will cause TextMate to use the code above the comment to estimate indent.

This commit closes textmate/c.tmbundle#3 and also closes textmate/php.tmbundle#24.
Introduce zeroIndentPattern

This will give the matched lines zero indent but without affecting the following lines.

Probably the only use-case for this is C preprocessor directives.
Remove whitespace when shifting text left

Previously shifting text left/right would ignore blank lines (as noted in issue #419).

When shifting left though it does make sense to delete whitespace, especially as the same code is used to re-indent when pasting.

Fixes #810.