[FIX] Emacs mode "C" improperly detected as C++
authorRobin Luckey <rluckey@geek.net>
Fri, 26 Mar 2010 21:52:03 +0000 (14:52 -0700)
committerRobin Luckey <rluckey@geek.net>
Fri, 26 Mar 2010 21:52:03 +0000 (14:52 -0700)
commit845f593133a2e3a2aa508e0c6ce9e268dd63a842
treed3d2318df1995287e3e560244bdbfc0417e49174
parenta3530cefffa9ed17ab813b40eedb626284cc97d6
[FIX] Emacs mode "C" improperly detected as C++

detector.c uses the file extenstion map to convert emacs modes
to languages. Because the upper-case "C" file extension maps to
C++, this means that emacs mode "C" also mapped to C++, which was
incorrect.

I've added a special check in the code for this case. Emacs modes
"c" and "C" now correctly map to straight C code.
src/detector.c
test/detect_files/emacs_mode.c [new file with mode: 0644]
test/unit/detector_test.h