Re: adding a language (lilypond)
Lorenzo Bettini <[email protected]> Sun, 11 Dec 2011 23:10:34 +0100
| Newsgroups | gmane.comp.gnu.source-highlight.general |
|---|---|
| Message-ID | <[email protected]> |
On 12/11/2011 08:07 PM, Federico Bruni wrote: > I've read the docs. > Very informative but I miss the most basic thing: how can I add a language? > > I tried the following (no success): > > - in src/lang.map I added: > ly = lilypond.lang > > - I added src/lilypond.lang and put just one line: > comment start "%" > The procedure you followed is correct. > Then I run again make and make install, but the changes I made are not > copied to /usr/local. I mean: lang.map misses my edit and there's no > lilypond.lang mh... that should not happen... are you sure that make install complete successfully... and that (after make install) you're actually running the installed source-highlight executable (please try 'which source-highlight'). Note also that source-highlight starts searching for its files in the current directory. You may want to check the lang files source-highlight is actually handling by running it with the command line option --lang-list Please, also consider that, when developing a new language, and in general, you can avoid installing: you can use the command line option --data-dir of source-highlight to force it to use the files (.lang, .map). Finally, if you add a .lang file in the lang.map file, if you want to install it, you'll also have to modify Makefile.am by adding your .lang file to the installed ones (you can take a look at src/Makefile.am). hope to hear from you soon! cheers Lorenzo -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net