On Sat, 18 Jan 2020, Sven Schreiber wrote:
Am 16.01.2020 um 20:40 schrieb Allin Cottrell:
> On Thu, 16 Jan 2020, Sven Schreiber wrote:
>> path right here). Then I logged out and in again. Gedit then offers a
>> "gretl" entry among the recognized programming languages, but no
syntax
>> highlighting is done. Too bad.
>
> I gave that a quick go myself but didn't get as far as you! No
> highlighting, and not even any "gretl" entry in the language listing.
> This was with gedit 3.34.1. BTW the path is
> /usr/share/gtksourceview-3.0/language-specs .
OK, I managed to get it working now. The problems seem to be the
references to the (non-open-source) foreign languages Stata and perhaps
also Ox.
So I commented out everything related to that; in particular the
<context id="foreign-stata"... and <context id="foreign-ox"...
blocks,
along with the associated lines close to the end of the file:
<!-- <context ref="foreign-stata"/> -->
<context ref="foreign-python"/>
<!-- <context ref="foreign-ox"/> -->
This time I copied the file not to the system-wide location but to
~/.local/share/gtksourceview-3.0/language-specs, but that shouldn't
matter of course.
Then restarting Gedit gave me syntax-coloring for gretl .inp files alright!
Ah, I'm seeing that too now -- after figuring out that on my system
gedit uses gtksourceview-4, so I was putting the lang file in the
wrong place before.
Meanwhile I've modified mklang.c in two ways:
* While the gretl file is still called gretl.lang and its "id" is
still "gretl", its "name" (inside the file, which appears in the
gedit language listing) is now "hansl".
* There's an option, "--gtksv", which skips the Stata and Ox foreign
support.
Allin