facelessuser/ApplySyntax — pull request #27 by weimeng (2013-09-29 06:28:29+00:00)
Title: Attempted fix for #26

Attempted fix for #26, as I discovered that the following packages (which I use) were storing the `.tmLanguage` file in `/Syntaxes` instead of in their package's root directory:

* [Sass](https://github.com/nathos/sass-textmate-bundle)
* [SCSS](https://github.com/MarioRicalde/SCSS.tmbundle)
* [Slim](https://github.com/slim-template/ruby-slim.tmbundle)

Here's what I did:

* Added "package_name" to `set_syntax` method to help account for situations where package name differs from syntax name
* Attempted to account for situations where `.tmLanguage` is stored in `/Syntaxes` instead of root directory by trying `sublime.load_resource(new_syntax)` then handling the exception by setting `new_syntax` to a path with `/Syntaxes`.

I'm not entirely sure if these changes are appropriate (especially the second one!) as I'm not really a Python developer, so please let me know if I should be making any changes.