This is required for the property-list bundle to highlight
.plist files that maybe in XML or non-XML formats.
Also specify the cached buffer disk contents to grammarForFilePath
so fs.read doesn't need to be called again if the contents are
already read.
A confirm dialog is now displayed whenever a session
with a dirty buffer is closed so dirty sessions can now
be processed when 'editor:close-other-tabs' is fired.
Previously only the active editor session was prompting to
save dirty buffers before closing. This caused the confirm
dialog to not display when closing from a tab since the
Editor.destroyEditSessionIndex is used there.
Previously window.shutdown() was called multiple times
if window.close() was called since the shutdown handler
was also fired in the native window controller.
This prevented proper serialization of the RootView
from occurring when then window was closed via meta-w or
meta-W since it was called a second time when already
empty of packages and editors.
Previously if null was returned for the end of word position then
it was interpreted as 0,0 which would select the entire contents
before the current word instead of the current word.
Previously we were relying on the package module itself to have a
`name` field. But now that we're using `atom.loadPackage` to load up
packages, we can infer the name of the module from the name of the
package directory.
When `UndoManager.transact` is called with no function, you later need
to `abort` or `commit` the transaction manually. This allows
transactions to last longer than the dynamic scope of the single
function passed to `transact`.
Also, add a spec to cover the loading of keymaps in `atom-spec` and
reset the `keymap`'s internal data after each spec gets run to prevent
test pollution with keymaps.
This prevents autosave from writing unmodified buffers to disk, which
was causing the tree view to rebuild directory contents based on the
write event just when switching tabs.
TextMatePackage is only designed to load resources out of a TextMate
bundle. It's used only at load time, and from that point out we only
refer to our own global `syntax` data structure to access the data that
it loads.
These changes are mostly aesthetic in nature. I just thought it would
be a good idea to have theme loading be parallel to package loading as
much as possible. So I localized more logic on the `atom` global.