Use 'main.tex' as main file if it exists
Merge pull request #155 from michamos/main-dot-tex

Use 'main.tex' as main file if it exists
Fixed #124 - support for the listings package.
Merge pull request #157 from timss/listings

Fixed #124 - support for the listings package.
Correctly find main file when user has non-standard magicness

Adds a \m to the search() call in GetMainTexFile(), which otherwise breaks if the user sets 'nomagic' or some other non-default magicness.
This would break LaTeX-Box realising that the current file is a main file in those circumstances.
Merge pull request #158 from fish-face/patch-1

Correctly find main file when user has non-standard magicness
nomagic compatibility for reference completion

I noticed that reference completion doesn't work with `nomagic` set (one might suggest I should just enable `magic`...), this should fix it.
Merge pull request #160 from fish-face/patch-2

nomagic compatibility for reference completion
Merge branch 'master' of git://github.com/LaTeX-Box-Team/LaTeX-Box