Hallo G.,
G. Milde schrieb am Mon 07. May, 10:56 (+0200):
> G. Milde schrieb:
>
> > Unfortunately, evaluating latex.sl now breaks my jed.
> >
> > > xjed -l latex.sl
> > Speicherzugriffsfehler
>
> After some experimenting, I came closer to what makes Jed break. This
> Speicherzugriffsfehler
For all they don't speak german, this is a segmentation fault.
> occurs after preparsing latex_cmds.sl and disappears after
> latex_cmds.slc is removed again.
I've no problems with precompiled files, but I must say, I don't use
them. I run a short test after your report, but I couldn't reproduce
the problem you've reported.
It sounds like a problem of Jed or SLang. Which version do you use? And
can you reproduce this bug?
> It turns out that latex_cmds.sl is a very special file, that only works
> if evaluated from the middle of latex.sl in the "latex" namespace.
Yes, it's a part I've sourced out from the main file, because it's big
and mainly configuration stuff. It needs the function cmd_add() and it
must be “local”. The following code should work:
public define cmd_add() { latex->cmd_add(); }
() = evalfile("latex_cmds");
> OTOH, latex.sl will not evaluate, if latex_cmds.sl is not in the Jed
> library path.
Yes. ?? Ahhm, I don't see the problem.
> Considering this mutual dependency, I wonder if it wouldn't be simpler and
> less error prone to merge it into latex.sl.
No, not simpler.
% LANG=C wc -l la*sl
66 latex_add.sl
939 latex_cmds.sl
119 latex_comm.sl
189 latex_conv.sl
1501 latex_external.sl
4980 latex.sl
7794 total
% wc -l /usr/share/jed/lib/site.sl
3368 /usr/share/jed/lib/site.sl
% pwd
jed-upstream/src
% wc -l *(.) | sort -n
2204 screen.c
2224 ledit.c
2607 menu.c
2985 wterm.c
3324 xterm.c
And I'm planing to outsource more parts. latex.sl is really big and I
don't want to have all code in one file.
Bye, Jörg.
--
Hügelschäfer's Law (http://www.bruhaha.de/laws.html):
Beiträge werden dort gepostet, wo sie den größten Widerstand hervorrufen.
Attachment:
pgpQiW01YQCM0.pgp
Description: PGP signature