dir-locals.el needs to `(defvar swift-project-directory)`, otherwise
we get an error from Emacs later on because the `let` has bound it as
the wrong kind of variable.
For some reason .dir-locals.el was setting tab-width to 2. That's a Really
Bad Idea, because if somehow (as happened in my case) indent-tabs-mode was
't instead of nil like it should have been, Emacs will insert tabs instead
of spaces, and it'll *look* like it's doing the right thing.
We used to force whitespace-mode on for everything in the Swift project
so people see their 80-column violations. I personally like
https://www.emacswiki.org/emacs/FillColumnIndicator better, so I changed
things such that I could reverse the decision made by .dir-locals.el:
(add-hook 'prog-mode-hook (lambda () (fci-mode t) (whitespace-mode -1)))
When visiting one of this project's C++ files for the first time in an
Emacs session, it wouldn't have loaded swift-project-settings.el in
time. Setting c-file-style later in the list of directory locals fixes
this issue. Also apply the same whitespace settings to objc-mode and
c-mode as c++-mode
Swift SVN r13632
New files automatically get the LLVM header if you enable
auto-insert-mode. You can also generate one explicitly in any file
using `M-x llvm-header'. Along the way, factored settings specific to
the Swift project out of swift-mode.el and put them in
swift-project-settings.el
Swift SVN r13319
I've been carrying this file around in my working copy for months now;
it makes sure you have swift-mode loaded for .swift files and sets up
cc-mode for editing Swift's ObjC++ files in our project's style.
Swift SVN r10641