title: Adding a new lexer to scintilla/scite (...and eventually wxPython StyledTextCtrl)
body: <p>Has anyone of you successfully added a lexer to scintilla? </p>
  
  <p>I have been following the short instructions at <a href="http://www.scintilla.org/SciTELexer.html" rel="nofollow noreferrer">http://www.scintilla.org/SciTELexer.html</a> - and even discovered the secret extra instructions at <a href="http://www.scintilla.org/ScintillaDoc.html#BuildingScintilla" rel="nofollow noreferrer">http://www.scintilla.org/ScintillaDoc.html#BuildingScintilla</a> (Changing Set of Lexers) </p>
  
  <p>Everything compiles, and I can add the lexer to SciTE just fine, but my ColouriseMapfileDoc method just does not get called (a printf does not produce output). If I add the same code to e.g. the ColouriseLuaDoc lexer, everything is fine (a printf <em>does</em> produce output).</p>
  
  <p>Specifically I have</p>
  
  <ol>
  <li>In <code>scintilla/include/Scintilla.iface</code>, added <code>val SCLEX_MAPFILE=99</code></li>
  <li>And any lexical class IDs</li>
  <li>In the scintilla/include directory run <code>HFacer.py</code> and confirmed that the <code>SciLexer.h</code> file has changed.</li>
  <li>Created <code>LexMapfile.cxx</code> with a <code>ColouriseMapfileDoc</code> function</li>
  <li><p>At the end of the file associated the lexer ID and name with the function:</p>
  
  <p>LexerModule lmMapfile(SCLEX_MAPFILE, ColouriseMapfileDoc, "mapfile");</p></li>
  <li><p>Run <code>LexGen.py</code> to generate all the makefiles (as per the secret instructions)</p></li>
  <li>Created a new SciTE properties file by cloning <code>scite/src/others.properties</code> </li>
  <li>Set up some styles</li>
  <li>In <code>scite/src/SciTEGlobal.properties</code> added <code>$(filter.conf)</code> to the definition of <code>open.filter</code>.</li>
  <li>Added this language to the Language menu of SciTE, </li>
  <li>Built both Scintilla and SciTE.</li>
  <li>Grumbled and cursed.</li>
  </ol>
  
  <p>What am I doing wrong, except maybe step 12?</p>