defunkt/coffee-mode — pull request #155 by febeling (2013-11-22 21:43:08+00:00)
Title: Use correct extension when compiling .js.coffee files

Some very common web frameworks like Rails use double extensions for
files that are precompiled. CoffeeScript source can have an extension
.js.coffee. The assumption is that the compiler writes out a file
which leaves out the last extension. Coffee-mode before would not work
well with this naming, because it would write a file with double
extension .js.js, assuming that extensions need to be switched.

This change looks at the buffer's file name, and if it already has a
.js extension after dropping the .coffee extension, then it does the
right thing and doesn't add one.