[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] nano bug #54928: a syntax file should be fully read onl
Re: [Nano-devel] nano bug #54928: a syntax file should be fully read only when the syntax gets actually used
Wed, 14 Nov 2018 19:49:54 +0100
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1
Op 14-11-18 om 08:14 schreef Vlad Vladov:
> Is anyone working on this right now?
Not that I know of. If you decide to work on this, please post on
the relevant report (https://savannah.gnu.org/bugs/?54928).
> If not I would be interested in taking a stab at it. Any suggestions where in
> the code I should look (I am new to this codebase)?
Hmm... Maybe it's not even possible, because of the 'extendsyntax'
command. Or it would mean re-evaluating each nanorc that contains
an extendsyntax command whenever switching to a new syntax. :|
Anyway, if you want to take a stab at it, look in src/rcfile.c,
at parse_rcfile(). Somehow you have to split that function in two,
one part that handles 'syntax', 'header', and 'magic', and finishes
when it sees another command, and a second part that handles the
rest. The second part will have to be called somewhere at the
end of color_update() in src/color.c, right before setting
Description: OpenPGP digital signature