Use O_CLOEXEC when possible

This avoids having to do a fcntl(fd, F_SETFD, FD_CLOEXEC) to set the “close on exec” flag.
Use symbolic name for FD_CLOEXEC

Unsure why I was using ‘1’ — perhaps the symbolic name was missing in the older SDK.
Add code to save Global.tmProperties

Instead of storing things in user defaults we will store them in ~/Library/Application Support/TextMate/Global.tmProperties.

This just makes things a lot easier than having to mix NSUserDefaults with our .tm_properties files, especially since changing a setting in the UI should sometimes be global, sometimes be for the current file’s type, and sometimes just for the current document (e.g. spelling language).

These features are already available with the .tm_properties.
Set default soft tabs settings for ninja and make

See issue #275.
Set default font to Menlo and add theme setting

Despite Menlo having been the new system font for fixed width text in the past several OS versions, NSFont’s userFixedPitchFontOfSize: still return Monaco, unless we build with the 10.8 SDK (and no, setting the deployment target to 10.7 does not produce something that actually runs on 10.7, at least not last I checked).

The disadvantage with Monaco as default font is that we lack bold and italic styles (since CoreText doesn’t synthesize these, unlike the legacy text rendering API TextMate 1.x used).
Preserve various OakTextView settings

All the settings are now taken exclusively from the property files, so no more user defaults. This means users will have to set their theme and font again.
Remove unused settings keys

More will follow as we hookup the preferences window to TextMate’s property system.
Add format_string::escape

This produces a string where all format string characters have been properly escaped.
Add kSettingsLineEndingsKey

Presently not used (by the loader/saver).
Add settings_t::raw_get

This allows getting a variable from the global domain without any variable interpolation (for settings that use $variables or \escapes).

This is required to provide a UI for editing preferences values (here we want to edit the unexpanded value, and the version in the global domain).
Quote variables when writing Global.tmProperties

We also eliminate variables which have same value as in Default.tmProperties.
Hookup Preferences window to tmProperties

Presently the new file type is not setup to use tmProperties as the way this is specified (in tmProperties) needs special-casing. Will likely change that.
Don’t do upward cascading when storing ‘attr’ settings

Used in tmProperties this is to target untitled files, files with unknown encoding, and similar, so unlike text or source scopes, we do not want to set the option broader than the exact scope.
Hookup document type in Preferences window

All UI settings in TextMate should now work and be sticky.

Closes issue #162.
Label the build.ninja target

This is to prettify the build output (for the cases where build.ninja needs to be regenerated).
Disable soft tabs for the project

Incase the user has it “globally” enabled.
New svn executable based Subversion scm driver

* Rewrote the Subversion SCM driver to use the svn executable
* Badges work just like Mercurial
* TM_SCM_BRANCH is set to the full repository URL for the working copy

See issue #273.
fixup! Extend gutter theming to selection foreground

Previous solution didn’t handle soft wrapped lines.

This solution also scales better, as we no longer need to break up ranges and create an entry per selected line.
Also save spelling language in settings

Missed this one in a previous commit.
Proper escaping in section headers (tmProperties)